{"openapi":"3.1.0","info":{"title":"Oatmilk Accounting API","version":"1.2.0","x-api-version":"2026-09-22","description":"Organization-scoped accounting, receipt intake, reconciliation, company mail, and administration. Generate scoped API keys in Settings or use Clerk OAuth. Default accounting scopes never grant company-mail access. Store credentials on a trusted backend; do not embed them in public browser code."},"externalDocs":{"description":"Guides, tutorials and the full reference","url":"https://app.getoatmilk.com/docs"},"servers":[{"url":"https://app.getoatmilk.com"}],"paths":{"/api/v1/accounting/contractors.list":{"post":{"summary":"List contractors, newest first: display and legal name, email, country, whether portal access is on (active), their job role (job_role_id) and revision. Filter by query (display or legal name); page with limit and offset. For roles, rates, pay cadence, agreement on file and pending hours use contractorOps.directory.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"query":{"type":"string","maxLength":200}},"additionalProperties":false}}}}},"get":{"summary":"List contractors, newest first: display and legal name, email, country, whether portal access is on (active), their job role (job_role_id) and revision. Filter by query (display or legal name); page with limit and offset. For roles, rates, pay cadence, agreement on file and pending hours use contractorOps.directory.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.get":{"post":{"summary":"Read one contractor by id: display and legal name, email, country, whether portal access is on (active), job role (job_role_id), reviewed tax profile (residency, services in Canada, identity confirmed) and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one contractor by id: display and legal name, email, country, whether portal access is on (active), job role (job_role_id), reviewed tax profile (residency, services in Canada, identity confirmed) and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_get_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.create":{"post":{"summary":"Add a contractor with displayName, legalName, email (unique in the organization), an optional two-letter country, an optional jobRoleId (an active role from contractorOps.roles.list; add one with contractorOps.roles.save) and idempotencyKey. No invitation is sent: invite them with contractors.invite, or share the link from contractors.invitations.link.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_create","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"type":"string","minLength":1,"maxLength":300},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"jobRoleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["displayName","legalName","email"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.update":{"post":{"summary":"Change a contractor's displayName, legalName or country with id and expectedRevision. Only an administrator can turn portal access on or off (active). Change their email with contractors.email.update and their job role with contractorOps.roles.assign.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_update","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"type":"string","minLength":1,"maxLength":300},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"active":{"type":"boolean"},"acknowledgeUnpaid":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.invite":{"post":{"summary":"Email a contractor an invitation to the contractor portal, with id and expectedRevision. It replaces any open invitation and lasts 7 days, at most 3 a day. The portal only shows them their own hours, agreements and payments. Refused once they've joined.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_invite","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invite"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.invitations.list":{"post":{"summary":"List a contractor's portal invitations (contractorId): the email each was sent to, when it expires, and whether it was accepted or revoked.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_invitations_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invitations.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"List a contractor's portal invitations (contractorId): the email each was sent to, when it expires, and whether it was accepted or revoked.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_invitations_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invitations.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.invitations.revoke":{"post":{"summary":"Revoke an open portal invitation with id and expectedRevision, so its link stops working.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_invitations_revoke","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invitations.revoke"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.templates.list":{"post":{"summary":"List contractor agreement templates: drafts written in Markdown and uploaded originals (PDF, Word or text).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"List contractor agreement templates: drafts written in Markdown and uploaded originals (PDF, Word or text).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.templates.create":{"post":{"summary":"Add a contractor agreement template from an uploaded original (fileId from contractors.files.confirm) with a title.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_templates_create","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["title","fileId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.templates.download":{"post":{"summary":"Get a template's Markdown, or a one-minute download link for its uploaded original.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_download","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a template's Markdown, or a one-minute download link for its uploaded original.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_download_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.templates.preview":{"post":{"summary":"Read a template to review it: Markdown, text or Word as text (up to 500,000 characters), or a one-minute link to a PDF.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_preview","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read a template to review it: Markdown, text or Word as text (up to 500,000 characters), or a one-minute link to a PDF.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_templates_preview_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.templates.update":{"post":{"summary":"Replace a Markdown template's title and content (contentMarkdown) with id and expectedRevision.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_templates_update","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.templates.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":200},"contentMarkdown":{"type":"string","minLength":1,"maxLength":500000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","title","contentMarkdown","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.files.prepare":{"post":{"summary":"Prepare a private upload for a contractor document (PDF, Word, Markdown or text, up to 20 MB) with filename, mimeType, sizeBytes and sha256. PUT the unchanged bytes to uploadUrl, then call contractors.files.confirm; alreadyUploaded means the same file is already stored and only needs confirming.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_files_prepare","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.files.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/markdown","text/plain"]},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":20000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.files.confirm":{"post":{"summary":"Confirm an uploaded contractor document (fileId) once its bytes are uploaded. Its size, SHA-256 and file type are checked against what was prepared.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_files_confirm","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.files.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["fileId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.list":{"post":{"summary":"List agreement documents sent through the contractor portal for signature (draft, requested, signed, declined or void), optionally for one contractor. For the agreement on file, signed copies, NDAs and terms, use contractorOps.agreements.list and contractorOps.terms.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"List agreement documents sent through the contractor portal for signature (draft, requested, signed, declined or void), optionally for one contractor. For the agreement on file, signed copies, NDAs and terms, use contractorOps.agreements.list and contractorOps.terms.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.agreements.get":{"post":{"summary":"Read one portal agreement document with its status, version and the contractor's signature events.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one portal agreement document with its status, version and the contractor's signature events.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_get_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.agreements.create":{"post":{"summary":"Create a draft agreement document for a contractor from a confirmed file (fileId), with a title and the contractor's expectedContractorRevision. Nothing is sent until contractors.agreements.send.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_agreements_create","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":200},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedContractorRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId","title","fileId","expectedContractorRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.revise":{"post":{"summary":"Replace an unsigned agreement document with a new confirmed file (fileId) and a reason, with expectedRevision. It goes back to draft as a new version; a signed one can't be revised (send an amendment with contractorOps.terms.propose).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_agreements_revise","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.revise"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","fileId","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.send":{"post":{"summary":"Ask a contractor who has joined the portal to sign a draft agreement document, with expectedRevision. Only they can sign it, in person, in their portal.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_agreements_send","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.send"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.remind":{"post":{"summary":"Email a contractor a reminder to sign the agreement document waiting for them, at most once a day, with expectedRevision.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_agreements_remind","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.remind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.void":{"post":{"summary":"Void an unsigned agreement document with a reason and expectedRevision, so it can't be signed. The record is kept; a signed one can't be voided.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_agreements_void","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.void"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.agreements.download":{"post":{"summary":"Get a one-minute download link for an agreement document, optionally for one version.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_download","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a one-minute download link for an agreement document, optionally for one version.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_agreements_download_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.agreements.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.hours.list":{"post":{"summary":"List time entries logged by contractors (date, minutes, description, status draft, submitted, approved or rejected, review reason), filtered by contractorId, status and from and to dates. For timesheets by pay period use contractorOps.timesheets.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_hours_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.hours.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["draft","submitted","approved","rejected"]},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"List time entries logged by contractors (date, minutes, description, status draft, submitted, approved or rejected, review reason), filtered by contractorId, status and from and to dates. For timesheets by pay period use contractorOps.timesheets.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_hours_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.hours.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","submitted","approved","rejected"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.hours.review":{"post":{"summary":"Approve or return one submitted time entry with id, expectedRevision, decision (approved or rejected) and a reason. Approving never sends money. To review a whole pay period at once use contractorOps.timesheets.review.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_hours_review","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.hours.review"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"decision":{"type":"string","enum":["approved","rejected"]},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["id","expectedRevision","decision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.recipients.list":{"post":{"summary":"List the Wise recipients confirmed as a contractor's (contractorId), with who confirmed each and why.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_recipients_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.recipients.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"List the Wise recipients confirmed as a contractor's (contractorId), with who confirmed each and why.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_recipients_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.recipients.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.recipients.bind":{"post":{"summary":"Confirm that a Wise recipient (profileId, recipientId) is this contractor, with a reason and the contractor's expectedContractorRevision, so transfers to it are attributed to them. A recipient can belong to one contractor.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_recipients_bind","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.recipients.bind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"profileId":{"type":"string","pattern":"^\\d{1,30}$"},"recipientId":{"type":"string","pattern":"^\\d{1,30}$"},"expectedContractorRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId","profileId","recipientId","expectedContractorRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.notifications.list":{"post":{"summary":"List contractor emails (portal invitations and signature requests and reminders) with their status: queued, sent (the provider accepted it), failed or cancelled. Queued doesn't mean delivered.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_notifications_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.notifications.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"List contractor emails (portal invitations and signature requests and reminders) with their status: queued, sent (the provider accepted it), failed or cancelled. Queued doesn't mean delivered.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_notifications_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.notifications.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.payments.list":{"post":{"summary":"List all payments to a contractor from linked bank transfers, Oatmilk payouts and imported history, with timesheet coverage and calendar-year totals for review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_list","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"List all payments to a contractor from linked bank transfers, Oatmilk payouts and imported history, with timesheet coverage and calendar-year totals for review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_list_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.payments.get":{"post":{"summary":"Read one outgoing bank transaction's contractor link or open identification question, with contractor choices. No payment credentials are returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["transactionId"],"additionalProperties":false}}}}},"get":{"summary":"Read one outgoing bank transaction's contractor link or open identification question, with contractor choices. No payment credentials are returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_get_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"transactionId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.payments.jobs":{"post":{"summary":"List recent contractor payment identification backfill jobs with progress counts and status, without bank or recipient details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_jobs","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.jobs"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":10,"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false}}}}},"get":{"summary":"List recent contractor payment identification backfill jobs with progress counts and status, without bank or recipient details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_jobs_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.jobs"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":30}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.payments.identify":{"post":{"summary":"Preview or apply contractor identification for one outgoing bank transaction, or queue a bounded backfill for all eligible transactions. Applying requires an idempotency key and never sends money.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_payments_identify","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.identify"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"dryRun":{"default":true,"type":"boolean"},"scope":{"default":{},"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.payments.link":{"post":{"summary":"Link an outgoing bank transaction to a contractor, with its expected revision, treatment, reason and idempotency key. Remembering its payee can identify later payments; no payout is sent.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_payments_link","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"treatment":{"default":"unknown","type":"string","enum":["services","reimbursement","unknown"]},"reason":{"type":"string","minLength":3,"maxLength":1000},"remember":{"default":true,"type":"boolean"},"respectPersonDecision":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId","transactionId","expectedTransactionRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.payments.unlink":{"post":{"summary":"Remove a contractor link from a bank transaction, or mark it as unrelated to contractors, with its expected revision, reason and idempotency key. The audit history remains.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_payments_unlink","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.unlink"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"notContractor":{"default":false,"type":"boolean"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["transactionId","expectedTransactionRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.invitations.link":{"post":{"summary":"Get a portal invitation link to send a contractor yourself: an open invitation is reused, or a 7-day one is created, and nothing is emailed. The same link keeps working until it expires or is revoked.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_invitations_link","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invitations.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.access.reset":{"post":{"summary":"Administrators only: end a contractor's portal link with id, expectedRevision and a written reason (at least 10 characters), so they can be invited again. Use it when the wrong account accepted an invitation or their sign-in email changed. Open invitations are cancelled. Their hours, agreements and payments stay. The reason is audited. Send a new invitation afterwards.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_access_reset","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.access.reset"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.email.update":{"post":{"summary":"Change the email a contractor is invited at, until they join the portal, with id, expectedRevision and email. It must be unique in the organization, and open invitations to the old address are revoked. Once they've joined, the email is their sign-in and can't change here. The audit log records that it changed, never the addresses.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_email_update","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.email.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision","email"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.invitations.fixEmail":{"post":{"summary":"Fix the email a contractor was invited at and send a new invitation in one step, until they join the portal, with id, expectedRevision and email. Open invitations to the old address stop working and their link says it was replaced, and a new 7-day invitation is queued to the corrected address. The email must be unique in the organization and different from the current one; at most 6 invitations a day. Refused once they've joined.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_invitations_fixEmail","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.invitations.fixEmail"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision","email"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.pastPayments.suggest":{"post":{"summary":"Suggest the Wise recipients whose past transfers were likely to this contractor (the family name and a given name match), with each one's number of transfers, total and dates, to link with contractors.pastPayments.link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_pastPayments_suggest","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.pastPayments.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"Suggest the Wise recipients whose past transfers were likely to this contractor (the family name and a given name match), with each one's number of transfers, total and dates, to link with contractors.pastPayments.link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_pastPayments_suggest_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.pastPayments.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractors.pastPayments.link":{"post":{"summary":"Confirm a Wise recipient (profileId, recipientId) is this contractor and link every past outgoing transfer to it, as services by default (treatment), with expectedContractorRevision. Transfers in a closed period are skipped and counted. Never sends money.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_pastPayments_link","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.pastPayments.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedContractorRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"profileId":{"type":"string","pattern":"^\\d{1,30}$"},"recipientId":{"type":"string","pattern":"^\\d{1,30}$"},"treatment":{"default":"services","type":"string","enum":["services","reimbursement","unknown"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId","expectedContractorRevision","profileId","recipientId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.payments.bind":{"post":{"summary":"Link one bank payment (transactionId with expectedTransactionRevision) to a contractor through a confirmed Wise recipient (recipientBindingId), as services, reimbursement or unknown, with a reason.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_payments_bind","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.bind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipientBindingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"treatment":{"type":"string","enum":["services","reimbursement","unknown"]},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["contractorId","recipientBindingId","transactionId","expectedTransactionRevision","treatment","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.payments.unbind":{"post":{"summary":"Unlink a bank payment from a contractor with id, expectedRevision and a reason. The history is kept.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_payments_unbind","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.payments.unbind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.taxProfile.update":{"post":{"summary":"Record a contractor's reviewed tax residency (canadian, nonresident or unknown), whether their services were performed in Canada (servicesInCanada), and whether their identity was verified, with a reason and expectedRevision. A Wise currency or bank country alone doesn't establish residency.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractors_taxProfile_update","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.taxProfile.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"residency":{"type":"string","enum":["canadian","nonresident","unknown"]},"servicesInCanada":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"identityConfirmed":{"type":"boolean"},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","residency","servicesInCanada","identityConfirmed","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractors.taxReport":{"post":{"summary":"Report a calendar year's contractor payments for T4A and T4A-NR review (calendarYear): reviewed payments for services and returns in CAD per contractor, payouts paid outside Wise, bank debits still to attribute, and open items. It holds no tax numbers.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_taxReport","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.taxReport"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calendarYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["calendarYear"],"additionalProperties":false}}}}},"get":{"summary":"Report a calendar year's contractor payments for T4A and T4A-NR review (calendarYear): reviewed payments for services and returns in CAD per contractor, payouts paid outside Wise, bank debits still to attribute, and open items. It holds no tax numbers.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractors_taxReport_get","tags":["contractors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractors.taxReport"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"calendarYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.get":{"post":{"summary":"Read company identity, tax registrations, filing settings and source provenance. GST/HST dates require profile.gstHst.registered, frequency and yearEnd; null means not configured, not a permission failure. warnings identifies conflicting saved corporate fiscal year-ends that need administrator confirmation.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read company identity, tax registrations, filing settings and source provenance. GST/HST dates require profile.gstHst.registered, frequency and yearEnd; null means not configured, not a permission failure. warnings identifies conflicting saved corporate fiscal year-ends that need administrator confirmation.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_get_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.recordChanges":{"post":{"summary":"Read what a kept company record (documentId of a company_document: articles, a certificate, an Ownr or registry package, an annual return) says about the company compared with the company profile: describesCompany (true when its name or corporation or business number matches, null when the profile has none yet) and changes, each { key, label, current, value, kind }: fill for an empty profile field, conflict for a different value. Oatmilk never saves them on its own: an admin chooses which to use (company.applyRecord, or company.facts.review and company.facts.apply for every record at once).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_recordChanges","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.recordChanges"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId"],"additionalProperties":false}}}}},"get":{"summary":"Read what a kept company record (documentId of a company_document: articles, a certificate, an Ownr or registry package, an annual return) says about the company compared with the company profile: describesCompany (true when its name or corporation or business number matches, null when the profile has none yet) and changes, each { key, label, current, value, kind }: fill for an empty profile field, conflict for a different value. Oatmilk never saves them on its own: an admin chooses which to use (company.applyRecord, or company.facts.review and company.facts.apply for every record at once).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_recordChanges_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.recordChanges"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.applyRecord":{"post":{"summary":"Save chosen facts of a kept company record into the company profile, replacing what is there, with documentId, fields (legalName, operatingName, businessNumber, corporationNumber, incorporationDate, jurisdiction, registration, gstHstAccount, gstHstEffectiveDate, gstHstFrequency, fiscalYearEnd, registeredOffice, directors, officers, shareholders), the profile's expectedRevision and idempotencyKey. Each saved fact notes the record as its source.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"company_applyRecord","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.applyRecord"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fields":{"minItems":1,"maxItems":19,"type":"array","items":{"type":"string","enum":["legalName","operatingName","businessNumber","corporationNumber","incorporationDate","jurisdiction","entityCountry","formationJurisdiction","legalForm","usFederalTaxClassification","registration","gstHstAccount","gstHstEffectiveDate","gstHstFrequency","fiscalYearEnd","registeredOffice","directors","officers","shareholders"]}}},"required":["expectedRevision","documentId","fields"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.update":{"post":{"summary":"Update company metadata and tax settings with the current revision and an idempotency key. Corporate annual returns remain distinct from tax periods.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"company_update","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"profile":{"type":"object","properties":{"legalName":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"tradingName":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"businessNumber":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{9}$"},{"type":"null"}]},"gstHstAccount":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{9}RT\\d{4}$"},{"type":"null"}]},"corporationNumber":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"provincialCorporationNumber":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"incorporationDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"jurisdiction":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"entity":{"default":{"country":null,"formationJurisdiction":null,"otherJurisdictionName":null,"legalForm":null,"usFederalTaxClassification":null,"taxResidenceCountry":null,"operatingJurisdictions":[],"registrations":[]},"type":"object","properties":{"country":{"default":null,"anyOf":[{"type":"string","enum":["CA","US","OTHER"]},{"type":"null"}]},"formationJurisdiction":{"default":null,"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"otherJurisdictionName":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"legalForm":{"default":null,"anyOf":[{"type":"string","enum":["corporation","llc","partnership","sole_proprietorship","nonprofit","cooperative","other","not_sure"]},{"type":"null"}]},"usFederalTaxClassification":{"default":null,"anyOf":[{"type":"string","enum":["c_corporation","s_corporation","partnership","disregarded_entity","tax_exempt","other","not_sure"]},{"type":"null"}]},"taxResidenceCountry":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]},"operatingJurisdictions":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"jurisdictionCode":{"type":"string","minLength":2,"maxLength":20},"activities":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["registered_office","employees","contractors","sales","property","other"]}},"status":{"type":"string","enum":["registered","assessing","not_registered"]}},"required":["jurisdictionCode","activities","status"],"additionalProperties":false}},"registrations":{"default":[],"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jurisdictionCode":{"type":"string","minLength":2,"maxLength":20},"program":{"type":"string","enum":["business_registration","foreign_qualification","tax_identification","corporate_income_tax","sales_tax","payroll","information_returns","annual_report","other"]},"status":{"type":"string","enum":["registered","not_registered","review_needed"]},"registrationNumber":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"effectiveDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"filingFrequency":{"default":null,"anyOf":[{"type":"string","enum":["annual","quarterly","monthly"]},{"type":"null"}]},"nextDueDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"sourceDocumentId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","jurisdictionCode","program","status"],"additionalProperties":false}}},"additionalProperties":false},"address":{"default":null,"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":500},"line2":{"default":"","type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"province":{"type":"string","maxLength":500},"postalCode":{"type":"string","maxLength":500},"country":{"default":"CA","type":"string","pattern":"^[A-Z]{2}$"}},"required":["line1","city","province","postalCode"],"additionalProperties":false},{"type":"null"}]},"corporateAnnualReturnMonthDay":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"fiscalYearEnd":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"bankHistoryStart":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"gstHst":{"default":{"registered":null,"effectiveDate":null,"frequency":null,"yearEnd":null,"method":null},"type":"object","properties":{"registered":{"default":null,"anyOf":[{"type":"boolean"},{"type":"null"}]},"effectiveDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"frequency":{"default":null,"anyOf":[{"type":"string","enum":["annual","quarterly","monthly"]},{"type":"null"}]},"yearEnd":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"method":{"default":null,"anyOf":[{"type":"string","enum":["regular","quick","special"]},{"type":"null"}]}},"additionalProperties":false},"t2PaymentMonths":{"default":null,"anyOf":[{"anyOf":[{"type":"number","const":2},{"type":"number","const":3}]},{"type":"null"}]},"t2ThreeMonthEligibilitySource":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_ ]{0,59}$"},"additionalProperties":{"type":"string","maxLength":2000}},"sources":{"default":{},"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":1000},"evidenceId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"verifiedAt":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["description"],"additionalProperties":false}}},"additionalProperties":false}},"required":["expectedRevision","profile"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.readiness":{"post":{"summary":"Read draft corporate or GST/HST tax workpapers, reviewed totals, unresolved records and preparation tasks. This does not file a return or calculate final T2 liability.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_readiness","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.readiness"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}}}},"get":{"summary":"Read draft corporate or GST/HST tax workpapers, reviewed totals, unresolved records and preparation tasks. This does not file a return or calculate final T2 liability.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_readiness_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.readiness"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["corporate","gst_hst"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.prep.overview":{"post":{"summary":"Read the guided year-end checklist for a corporate (T2) fiscal year or a GST/HST period: steps with status, counts and the next action, progress, the periods to choose from and deadlines. Input { kind, year? | from and to?, summary?, includeWorkpaper? }; without a year it opens the newest ended period, even when it is done. summary: true leaves out the record lists (for a period's steps left). includeWorkpaper: true returns the same period's full workpaper alongside the checklist, or null when unsupported. Read-only; nothing is filed or paid.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prep_overview","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prep.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["corporate","gst_hst"]},"year":{"type":"integer","minimum":1900,"maximum":2200},"from":{"type":"string"},"to":{"type":"string"},"latest":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"summary":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"includeWorkpaper":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"required":["kind"],"additionalProperties":false}}}}},"get":{"summary":"Read the guided year-end checklist for a corporate (T2) fiscal year or a GST/HST period: steps with status, counts and the next action, progress, the periods to choose from and deadlines. Input { kind, year? | from and to?, summary?, includeWorkpaper? }; without a year it opens the newest ended period, even when it is done. summary: true leaves out the record lists (for a period's steps left). includeWorkpaper: true returns the same period's full workpaper alongside the checklist, or null when unsupported. Read-only; nothing is filed or paid.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prep_overview_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prep.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["corporate","gst_hst"]}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":1900,"maximum":2200}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"latest","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"summary","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"includeWorkpaper","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.sources.prepare":{"post":{"summary":"Prepare an immutable private PDF or photo company/tax source upload. Returns a signed upload URL; this does not create an expense or run AI.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_sources_prepare","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.sources.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mimeType":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/webp","image/heic","image/heif"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.sources.confirm":{"post":{"summary":"Verify uploaded company/tax source original bytes and preserve evidence without creating accounting entries. Returns an evidence ID for source references.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_sources_confirm","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.sources.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["submissionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.entries.review":{"post":{"summary":"Confirm recognition date, GST/HST treatment, supporting documentation, input tax credit eligibility and explicit CAD exchange-rate provenance for an entry. For GST/HST dated before the registration date, preRegistration records the decision: no_itc (a purchase with no input tax credit) or accountant. Requires both entry and tax-review revisions.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_entries_review","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.entries.review"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"recognitionDate":{"type":"string"},"taxPointDate":{"type":"string"},"itcClaimDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"taxKind":{"type":"string","enum":["gst_hst","none","other"]},"gstHstMinor":{"type":"string","pattern":"^\\d+$"},"otherSalesTaxMinor":{"type":"string","pattern":"^\\d+$"},"itcBasisPoints":{"type":"integer","minimum":0,"maximum":10000},"itcEligibility":{"type":"string","enum":["eligible","ineligible","not_applicable"]},"documentComplete":{"type":"boolean"},"supplierRegistration":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recipientNamed":{"type":"boolean"},"supplyDescribed":{"type":"boolean"},"paymentTermsPresent":{"type":"boolean"},"exchangeRate":{"default":null,"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,12})?$"},{"type":"null"}]},"exchangeRateDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"exchangeRateSource":{"default":null,"anyOf":[{"type":"string","minLength":3,"maxLength":1000},{"type":"null"}]},"preRegistration":{"anyOf":[{"type":"string","enum":["no_itc","accountant"]},{"type":"null"}]},"reason":{"type":"string","minLength":3,"maxLength":2000}},"required":["entryId","entryRevision","expectedRevision","recognitionDate","taxPointDate","taxKind","gstHstMinor","otherSalesTaxMinor","itcBasisPoints","itcEligibility","documentComplete","recipientNamed","supplyDescribed","paymentTermsPresent","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.treatment.auto":{"post":{"summary":"Settle the sales tax of every record in a tax period that the rules can prove, as Autopilot, for { period, snapshotHash, pass, idempotencyKey }: bank fees, interest, payments to companies outside Canada or to contractors, small purchases with no receipt (no credit claimed) and receipts whose tax adds up. Each is saved as the same tax review a person would save, marked automatic with its plain reason, and can be undone. Records a person reviewed or undid, and records that changed, are left alone. Returns { applied, skipped, remaining }.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_treatment_auto","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.treatment.auto"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pass":{"type":"integer","minimum":0,"maximum":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","snapshotHash","pass"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.treatment.apply":{"post":{"summary":"Confirm a whole group of records at once for { period, code, entryIds, idempotencyKey }: each record listed that is still in the group gets the treatment Oatmilk suggests for that reason (for example no tax credit for purchases without a receipt), saved as a tax review in the caller's name and marked as confirmed together. Records that changed or are no longer in the group are skipped and reported. The closed-period and revision guards still apply.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_treatment_apply","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.treatment.apply"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"code":{"type":"string","enum":["bank_fee","exempt_category","interest","contractor","receipt_no_tax","receipt_tax","foreign_vendor","same_as_before","small_no_receipt","no_receipt","receipt_unread","recorded_tax","recorded_sale_tax","sale_no_tax"]},"entryIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","code","entryIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.treatment.undo":{"post":{"summary":"Undo a tax review that Autopilot or a group confirmation saved, for { entryId, expectedRevision, idempotencyKey }: the record goes back to open and Autopilot leaves it alone until it changes. A review a person saved cannot be undone this way. Refused in a closed period.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_treatment_undo","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.treatment.undo"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.adjustments.update":{"post":{"summary":"Record reviewed regular-method GST/HST adjustments, instalments, rebates and self-assessments in CAD minor units, with reason, source evidence, revision and the current ledger snapshot. This does not remit tax or file a return.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_adjustments_update","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.adjustments.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"line104Minor":{"type":"string","pattern":"^\\d+$"},"line107Minor":{"type":"string","pattern":"^\\d+$"},"line110Minor":{"type":"string","pattern":"^\\d+$"},"line111Minor":{"type":"string","pattern":"^\\d+$"},"line205Minor":{"type":"string","pattern":"^\\d+$"},"line405Minor":{"type":"string","pattern":"^\\d+$"},"reason":{"type":"string","minLength":3,"maxLength":2000},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"evidenceIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["expectedRevision","period","line104Minor","line107Minor","line110Minor","line111Minor","line205Minor","line405Minor","reason","snapshotHash"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.checks.update":{"post":{"summary":"Record tax-preparation review evidence against the current workpaper snapshot, with revision checks. Later ledger changes invalidate completed checks.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_checks_update","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.checks.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"check":{"type":"string","enum":["bank_coverage","opening_balances","financial_statements","gifi_mapping","capital_assets","shareholder_loans","payroll","contractor_slips","gst_adjustments","instalments","prior_returns"]},"status":{"type":"string","enum":["todo","complete","not_applicable"]},"reason":{"type":"string","minLength":3,"maxLength":2000},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"evidenceIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["expectedRevision","period","check","status","reason","snapshotHash"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.export":{"post":{"summary":"Create a private year-end package for { period, expectedSnapshotHash, idempotencyKey }. The core zip (url) holds a README, a summary PDF, the workpaper JSON and CSV, record listings and a hash manifest; corporate years add a draft income statement by GIFI line, a general ledger, the year-end questionnaire, contractor payments and, when registered, a GST/HST summary, and GST/HST periods add the return lines and the period's records instead. Original receipts, statements, Stripe records and tax documents come as separate originals parts (parts[], each under 40 MB, hashed in the manifest). Repeating the request with the same key returns the same package with fresh links. Requires the current snapshot hash. Nothing is filed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_export","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.export"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"expectedSnapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","expectedSnapshotHash"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.gifi.get":{"post":{"summary":"Read the categories with records in a tax period ({ period }), their reviewed CAD totals, suggested and confirmed GIFI codes from the CRA RC4088 index, the supported code list, the mapping revision and a draft income statement by GIFI line. Suggestions are never saved until confirmed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_gifi_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.gifi.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}},"get":{"summary":"Read the categories with records in a tax period ({ period }), their reviewed CAD totals, suggested and confirmed GIFI codes from the CRA RC4088 index, the supported code list, the mapping revision and a draft income statement by GIFI line. Suggestions are never saved until confirmed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_gifi_get_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.gifi.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":true,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.gifi.confirm":{"post":{"summary":"Confirm a corporate year's tax lines (GIFI) for { period, snapshotHash, idempotencyKey } once every category with activity has a confirmed GIFI code and every record has a category: saves the financial statements and GIFI mapping checks the way the tax lines step does. Refused (INVALID_STATE) while a category still needs a code (tax.gifi.update) or a record has no category. A changed snapshotHash means records changed: read again. Nothing is filed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_gifi_confirm","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.gifi.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","snapshotHash"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.questions.list":{"post":{"summary":"Read the year-end questions of a corporate tax year ({ period }), the questions step of tax preparation: each question's key, title, question and plain hint; the answers it takes (yes, no, not_sure) with what each one means and the follow-up fields it asks for (choice and choice2 with their options, text, amount in dollars, note, files); the saved answer read back from the tax checks, open (left for the accountant) or stale (records changed after it was saved); Oatmilk's suggested answer from the books where it has one; progress; and the snapshotHash to answer with. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_questions_list","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.questions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}},"get":{"summary":"Read the year-end questions of a corporate tax year ({ period }), the questions step of tax preparation: each question's key, title, question and plain hint; the answers it takes (yes, no, not_sure) with what each one means and the follow-up fields it asks for (choice and choice2 with their options, text, amount in dollars, note, files); the saved answer read back from the tax checks, open (left for the accountant) or stale (records changed after it was saved); Oatmilk's suggested answer from the books where it has one; progress; and the snapshotHash to answer with. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_questions_list_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.questions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":true,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.questions.answer":{"post":{"summary":"Answer one year-end question of a corporate tax year: { period, question, answer: yes|no|not_sure, choice?, choice2?, text?, amount?, note?, evidenceIds?, snapshotHash, idempotencyKey }. tax.questions.list names the follow-up fields each answer needs; amounts are in dollars (\"1250.00\") and files are evidence ids, from tax.sources.confirm or an original already kept with a record. Oatmilk checks the answer as the questions step does, words it the same way and saves it as the question's tax checks at their current revisions, exactly like tax.checks.update. not_sure leaves the question open for the accountant. Returns the saved checks. A changed snapshotHash means records changed: read the questions again. Nothing is filed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_questions_answer","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.questions.answer"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"question":{"type":"string","enum":["accounts","first_year","capital_assets","owner_money","payroll","contractors","instalments","unusual"]},"answer":{"type":"string","enum":["yes","no","not_sure"]},"choice":{"type":"string","maxLength":40},"choice2":{"type":"string","maxLength":40},"text":{"type":"string","maxLength":100},"amount":{"anyOf":[{"type":"string","maxLength":40},{"type":"number","minimum":0}]},"note":{"type":"string","maxLength":2000},"evidenceIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","question","answer","snapshotHash"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.gifi.update":{"post":{"summary":"Confirm GIFI codes for categories with mappings [{ categoryId, code }], the current mapping revision (expectedRevision) and an idempotency key. Codes must be in the supported GIFI list. Changes are audited and do not change any accounting record.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_gifi_update","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.gifi.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mappings":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string","enum":["1001","1002","1003","1060","1066","1300","1484","1740","1774","1787","2620","2621","2680","2780","3500","3600","3700","8000","8090","8091","8230","8231","8241","8242","8320","8340","8360","8370","8520","8521","8522","8523","8524","8590","8620","8621","8622","8690","8710","8711","8714","8715","8716","8760","8761","8762","8764","8810","8811","8860","8861","8862","8863","8871","8876","8910","8911","8912","8914","8960","9060","9110","9130","9131","9135","9150","9152","9200","9201","9220","9225","9270","9275","9281","9282"]}},"required":["categoryId","code"],"additionalProperties":false}},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["mappings","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/requests.people":{"post":{"summary":"List the eligible people (possible assignees) for one record: active people who can access it and help resolve its next action, each with the userId that requests.create takes as assigneeUserId. Includes the bound contractor for their own timesheet or profile.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"requests_people","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.people"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjectType":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]},"subjectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["subjectType","subjectId"],"additionalProperties":false}}}}},"get":{"summary":"List the eligible people (possible assignees) for one record: active people who can access it and help resolve its next action, each with the userId that requests.create takes as assigneeUserId. Includes the bound contractor for their own timesheet or profile.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"requests_people_get","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.people"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"subjectType","in":"query","required":true,"schema":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]}},{"name":"subjectId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/requests.create":{"post":{"summary":"Ask an eligible person to resolve a record, optionally with a personal message. Find the eligible people and their assigneeUserId with requests.people first. Creates their personal task immediately and batches their notification email after ten minutes. Requires an idempotency key; one open request per record and recipient.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"requests_create","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjectType":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]},"subjectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"assigneeUserId":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["subjectType","subjectId","assigneeUserId"],"additionalProperties":false}}}}}},"/api/v1/accounting/requests.list":{"post":{"summary":"List personal action requests, by default your open tasks. With mine false, list visible requests you sent or finance-visible requests for one record.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"requests_list","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mine":{"default":true,"type":"boolean"},"status":{"default":"open","type":"string","enum":["open","done","cancelled","all"]},"subjectType":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]},"subjectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List personal action requests, by default your open tasks. With mine false, list visible requests you sent or finance-visible requests for one record.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"requests_list_get","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mine","in":"query","required":false,"schema":{"default":true,"type":"boolean"}},{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","done","cancelled","all"]}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/requests.update":{"post":{"summary":"Complete your assigned request or cancel a request you sent. Administrators may resolve or cancel visible requests. Requires the current revision and an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"requests_update","tags":["requests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/requests.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["done","cancelled"]},"response":{"type":"string","maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","status","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/runs.list":{"post":{"summary":"List AI and automation runs with their current step, status, and summary. Filter by kind (or a comma-separated kinds list), subject, or status. Contributors see only runs for their own submissions.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_list","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"kinds":{"type":"string","maxLength":1000,"pattern":"^[a-z][a-z0-9_.]{1,60}(,[a-z][a-z0-9_.]{1,60}){0,19}$"},"subjectType":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"subjectId":{"type":"string","minLength":1,"maxLength":200},"subjectIds":{"type":"string","maxLength":4000,"pattern":"^[A-Za-z0-9_:.,-]*$"},"status":{"type":"string","enum":["queued","running","succeeded","failed","needs_review","cancelled"]},"activeOnly":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List AI and automation runs with their current step, status, and summary. Filter by kind (or a comma-separated kinds list), subject, or status. Contributors see only runs for their own submissions.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_list_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"}},{"name":"kinds","in":"query","required":false,"schema":{"type":"string","maxLength":1000,"pattern":"^[a-z][a-z0-9_.]{1,60}(,[a-z][a-z0-9_.]{1,60}){0,19}$"}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"subjectIds","in":"query","required":false,"schema":{"type":"string","maxLength":4000,"pattern":"^[A-Za-z0-9_:.,-]*$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","running","succeeded","failed","needs_review","cancelled"]}},{"name":"activeOnly","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/runs.get":{"post":{"summary":"Read one run, or the latest run for a subject, with its ordered step events: steps started and finished, model calls, outputs, decisions, and errors. Use afterEventId to fetch only new events while a run is active.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"subjectId":{"type":"string","minLength":1,"maxLength":200},"afterEventId":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"default":500,"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false}}}}},"get":{"summary":"Read one run, or the latest run for a subject, with its ordered step events: steps started and finished, model calls, outputs, decisions, and errors. Use afterEventId to fetch only new events while a run is active.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_get_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"afterEventId","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":500,"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/runs.trace":{"post":{"summary":"Read an authorized process trace with its stage timeline, logs, model metadata, and linked Workflow SDK run, steps, and events. Restricted mail remains visible only to a security administrator.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_trace","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.trace"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":500,"type":"integer","minimum":1,"maximum":1000}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read an authorized process trace with its stage timeline, logs, model metadata, and linked Workflow SDK run, steps, and events. Restricted mail remains visible only to a security administrator.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_trace_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.trace"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":500,"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/runs.workflows.list":{"post":{"summary":"List organization-owned Workflow SDK jobs for receipts, mail, matching, Stripe, and accounting digest replies.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_list","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.list"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"List organization-owned Workflow SDK jobs for receipts, mail, matching, Stripe, and accounting digest replies.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_list_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.list"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/runs.workflows.catalog":{"post":{"summary":"List organization-owned Workflow SDK jobs and indicate which job sources are unavailable while a database update is pending.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_catalog","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.catalog"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"List organization-owned Workflow SDK jobs and indicate which job sources are unavailable while a database update is pending.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_catalog_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.catalog"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/runs.workflows.get":{"post":{"summary":"Inspect an organization-owned Workflow SDK run with its steps, events, statuses, and redacted input and output.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.get"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":200}},"required":["runId"],"additionalProperties":false}}}}},"get":{"summary":"Inspect an organization-owned Workflow SDK run with its steps, events, statuses, and redacted input and output.","description":"Required scopes: accounting:read, mail:read, mail:security. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"runs_workflows_get_get","tags":["runs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/runs.workflows.get"},"x-required-scopes":["accounting:read","mail:read","mail:security"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"runId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/agents.overview":{"post":{"summary":"List the platform's agents (Autopilot, receipt reader, matcher, mail router, inbox scanner, bank sync and others) with what each checks for, its triggers, schedule, models and safeguards, and its live status: running now with the current step, needs attention, scheduled with the next run, or idle, plus the last run and the 24-hour run count, success rate and median duration. Follow a run with runs.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_overview","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the platform's agents (Autopilot, receipt reader, matcher, mail router, inbox scanner, bank sync and others) with what each checks for, its triggers, schedule, models and safeguards, and its live status: running now with the current step, needs attention, scheduled with the next run, or idle, plus the last run and the 24-hour run count, success rate and median duration. Follow a run with runs.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_overview_get","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/agents.playground.receipt":{"post":{"summary":"Dry run of the receipt reader: read a sample receipt (filename, mimeType, contentBase64 of up to 2 MB; JPEG, PNG, WebP, HEIC, PDF or .eml) the same way intake does and return the extracted facts and validation flags. Nothing is saved: no submission, evidence, entry or run.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_playground_receipt","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.playground.receipt"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","message/rfc822"]},"contentBase64":{"type":"string","minLength":4,"maxLength":2800000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["filename","mimeType","contentBase64"],"additionalProperties":false}}}}},"get":{"summary":"Dry run of the receipt reader: read a sample receipt (filename, mimeType, contentBase64 of up to 2 MB; JPEG, PNG, WebP, HEIC, PDF or .eml) the same way intake does and return the extracted facts and validation flags. Nothing is saved: no submission, evidence, entry or run.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_playground_receipt_get","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.playground.receipt"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"filename","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"mimeType","in":"query","required":true,"schema":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","message/rfc822"]}},{"name":"contentBase64","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":2800000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/agents.playground.match":{"post":{"summary":"Dry run of the receipt matcher for one receipt entry (entryId): return the shortlisted bank and card candidates in ranked order and the matcher's judgement with the organization's saved model and thresholds. Nothing is saved or matched.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_playground_match","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.playground.match"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Dry run of the receipt matcher for one receipt entry (entryId): return the shortlisted bank and card candidates in ranked order and the matcher's judgement with the organization's saved model and thresholds. Nothing is saved or matched.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"agents_playground_match_get","tags":["agents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/agents.playground.match"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/email.status":{"post":{"summary":"Read outbound email readiness: the sending domain, each sender identity address, and whether delivery is enabled in this environment.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_status","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read outbound email readiness: the sending domain, each sender identity address, and whether delivery is enabled in this environment.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_status_get","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/email.outbox.list":{"post":{"summary":"List outbound platform emails with their sender identity, recipients, subject, delivery state, attempts, and related record.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_outbox_list","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.outbox.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"relatedType":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"relatedId":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"status":{"type":"string","enum":["queued","processing","sent","failed","cancelled"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List outbound platform emails with their sender identity, recipients, subject, delivery state, attempts, and related record.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_outbox_list_get","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.outbox.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"relatedType","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"}},{"name":"relatedId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","processing","sent","failed","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/email.test":{"post":{"summary":"Queue a test email from one sender identity to the requesting administrator to verify outbound delivery.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"email_test","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.test"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identity":{"type":"string","enum":["accounting","invoices","signatures","reminders","contractors","notifications"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["identity"],"additionalProperties":false}}}}}},"/api/v1/accounting/email.domain.status":{"post":{"summary":"Inspect the organization's custom email domain and the provider's public DNS records.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_domain_status","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Inspect the organization's custom email domain and the provider's public DNS records.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"email_domain_status_get","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/email.domain.configure":{"post":{"summary":"Start verification of an organization-owned custom sending and receiving domain.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"email_domain_configure","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.configure"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","minLength":4,"maxLength":253},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["domain"],"additionalProperties":false}}}}}},"/api/v1/accounting/email.domain.verify":{"post":{"summary":"Ask the email provider to verify the current custom domain's DNS records.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"email_domain_verify","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.verify"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/email.domain.activate":{"post":{"summary":"Use a custom domain only after its sending and receiving DNS records are verified.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"email_domain_activate","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.activate"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/email.domain.usePlatform":{"post":{"summary":"Return new outbound and receiving addresses to the default Oatmilk domains.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"email_domain_usePlatform","tags":["email"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/email.domain.usePlatform"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/ai.keys.get":{"post":{"summary":"Which AI providers this organization brought its own keys for (TypeSafe, Vercel AI Gateway, OpenAI, Google Gemini, Z.ai), each with the key's last four characters and when it was checked, never the key itself; whether Oatmilk's own AI credits are on for it; and whether its keys cover decisions (categorizing, matching, sorting) and reading documents.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_keys_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.keys.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Which AI providers this organization brought its own keys for (TypeSafe, Vercel AI Gateway, OpenAI, Google Gemini, Z.ai), each with the key's last four characters and when it was checked, never the key itself; whether Oatmilk's own AI credits are on for it; and whether its keys cover decisions (categorizing, matching, sorting) and reading documents.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_keys_get_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.keys.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/ai.keys.save":{"post":{"summary":"Save or replace this organization's key for one AI provider, at the current revision (0 for the first key). Oatmilk checks the key with the provider first and saves it encrypted. Administrators only, from the dashboard.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"ai_keys_save","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.keys.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["typesafe-ai","gateway","openai","google","zai"]},"apiKey":{"type":"string","minLength":8,"maxLength":500,"pattern":"^\\S+$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["provider","apiKey","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/ai.keys.remove":{"post":{"summary":"Remove this organization's key for one AI provider, at the current revision. Features that need it ask for a key again unless Oatmilk's AI credits are on. Administrators only, from the dashboard.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"ai_keys_remove","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.keys.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["typesafe-ai","gateway","openai","google","zai"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["provider","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.admin.overview":{"post":{"summary":"Platform administrators only (the platform's own organization): God Mode's overview. Signup mode, totals (workspaces, new ones, members, sign-ups, waiting requests, AI requests and cost) and every workspace with aggregate numbers only: members, transactions and receipts brought in, agreements, contractors, invoices, actions in the period, last activity, whose AI keys it uses and its AI usage and cost (AI Gateway's spend report when available, otherwise Oatmilk's own count). Never records, people or contents. days (1 to 90, default 30) sets the period.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_overview","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":30,"type":"integer","minimum":1,"maximum":90}},"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only (the platform's own organization): God Mode's overview. Signup mode, totals (workspaces, new ones, members, sign-ups, waiting requests, AI requests and cost) and every workspace with aggregate numbers only: members, transactions and receipts brought in, agreements, contractors, invoices, actions in the period, last activity, whose AI keys it uses and its AI usage and cost (AI Gateway's spend report when available, otherwise Oatmilk's own count). Never records, people or contents. days (1 to 90, default 30) sets the period.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_overview_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/platform.admin.accessRequests.list":{"post":{"summary":"Platform administrators only: people who asked for access on the waitlist, newest first, with what they told us (email, name, company, role, size, website, kinds of financial data, banks, interests, notes) and the request's status and revision. status filters pending (default), approved, declined or all.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_accessRequests_list","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.accessRequests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"default":"pending","type":"string","enum":["pending","approved","declined","all"]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500}},"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only: people who asked for access on the waitlist, newest first, with what they told us (email, name, company, role, size, website, kinds of financial data, banks, interests, notes) and the request's status and revision. status filters pending (default), approved, declined or all.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_accessRequests_list_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.accessRequests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","declined","all"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/platform.admin.accessRequests.review":{"post":{"summary":"Platform administrators only: approve or decline a waitlist request at its current revision. Approving emails the person a link to set up their workspace; platformAi lets their company use Oatmilk's AI credits instead of only its own keys. Declining sends nothing, and a declined request can be approved later.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_admin_accessRequests_review","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.accessRequests.review"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["approve","decline"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"platformAi":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["requestId","decision","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.admin.organizations.get":{"post":{"summary":"Platform administrators only: one workspace in God Mode with aggregate numbers only: its counts, its access (approved or paused, AI credits), which AI providers it brought keys for (never the keys), AI usage by feature and model, what kinds of actions it took in the period with how many of each, and the waitlist request it came from.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_organizations_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.organizations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,200}$"},"days":{"default":30,"type":"integer","minimum":1,"maximum":90}},"required":["organizationId"],"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only: one workspace in God Mode with aggregate numbers only: its counts, its access (approved or paused, AI credits), which AI providers it brought keys for (never the keys), AI usage by feature and model, what kinds of actions it took in the period with how many of each, and the waitlist request it came from.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_organizations_get_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.organizations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"organizationId","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,200}$"}},{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/platform.admin.experiments.list":{"post":{"summary":"Platform administrators only: every experimental feature (such as RTS mode), who it is offered to (off, team for the platform's own workspace, or everyone), its Vercel flag key and that flag's value in Vercel Flags when the deployment is connected, plus the deployment-wide experimental-mode flag. People still turn each experiment on for themselves in Settings › Experimental.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_experiments_list","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.experiments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only: every experimental feature (such as RTS mode), who it is offered to (off, team for the platform's own workspace, or everyone), its Vercel flag key and that flag's value in Vercel Flags when the deployment is connected, plus the deployment-wide experimental-mode flag. People still turn each experiment on for themselves in Settings › Experimental.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_admin_experiments_list_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.experiments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/platform.admin.experiments.update":{"post":{"summary":"Platform administrators only: offer one experiment to nobody (off), only the platform's own workspace (team) or every workspace (everyone). A Vercel flag set to off in Vercel Flags still keeps it off. Turning it off stops it at once for everyone who had it on. Pass expectedRevision from platform.admin.experiments.list.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_admin_experiments_update","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.experiments.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"experiment":{"type":"string","enum":["rts-mode"]},"audience":{"type":"string","enum":["off","team","everyone"],"description":"off offers it to nobody, team only to the platform's own workspace, everyone to every workspace."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read. A different revision means the choices changed first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["experiment","audience"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.admin.organizations.update":{"post":{"summary":"Platform administrators only: pause or resume a workspace (status approved or suspended) and turn Oatmilk's AI credits on or off for it (platformAi), at its current revision (0 for a workspace with no access record yet). The platform's own organization can't be changed.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_admin_organizations_update","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.admin.organizations.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,200}$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["approved","suspended"]},"platformAi":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["organizationId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.settings.get":{"post":{"summary":"Read workspace preferences for invoicing numbers and defaults, document branding, compliance reminders, and the inbox AI models: which model reads each email and which gives the second opinion, and at what effort.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_settings_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read workspace preferences for invoicing numbers and defaults, document branding, compliance reminders, and the inbox AI models: which model reads each email and which gives the second opinion, and at what effort.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_settings_get_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/platform.settings.update":{"post":{"summary":"Update invoicing numbering and defaults, letterhead text, compliance reminder preferences, and the inbox AI models, with a revision check. inboxAi.reading reads each email and its attachments into a draft; inboxAi.checking is the second opinion on anything left unclear. Each takes a model, one of openai/gpt-6.1-sol (GPT-6.1 Sol), openai/gpt-6-luna (GPT-6 Luna), google/gemini-3.8-flash (Gemini 3.8 Flash), zai/glm-5.3-flash (GLM-5.3 Flash), and a low, medium or high effort; null puts that step back on the recommended GPT-6 Luna at medium effort for reading and GPT-6 Luna at medium for the second opinion.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_settings_update","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"invoicing":{"type":"object","properties":{"numberPattern":{"default":"INV-{YYYY}-{NNN}","type":"string","minLength":3,"maxLength":60,"pattern":"\\{N+\\}"},"nextNumber":{"default":1,"type":"integer","minimum":1,"maximum":999999999},"defaultDueDays":{"default":30,"type":"integer","minimum":0,"maximum":365},"defaultNotes":{"default":"","type":"string","maxLength":2000},"senderName":{"default":"","type":"string","maxLength":200},"senderTitle":{"default":"","type":"string","maxLength":200},"replyTo":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"reviewLeadDays":{"default":3,"type":"integer","minimum":0,"maximum":60},"showTaxNumber":{"default":false,"type":"boolean"},"showLogo":{"default":false,"type":"boolean"},"payUrl":{"default":null,"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"wisePayLink":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false},"branding":{"type":"object","properties":{"letterheadTagline":{"default":null,"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"additionalProperties":false},"compliance":{"type":"object","properties":{"remindersEnabled":{"default":true,"type":"boolean"},"weeklyAccountingDigestEnabled":{"default":true,"type":"boolean"},"monthlySubscriptionsDigestEnabled":{"default":false,"type":"boolean"},"receiptChaseEnabled":{"default":true,"type":"boolean"},"receiptChaseEveryDays":{"default":7,"anyOf":[{"type":"number","const":7},{"type":"number","const":14}]},"receiptChaseEscalate":{"default":true,"type":"boolean"},"receiptChaseEscalateDays":{"default":14,"type":"integer","minimum":4,"maximum":60},"recipients":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"leadDays":{"default":[30,14,7,3,1,0],"minItems":1,"maxItems":8,"type":"array","items":{"type":"integer","minimum":0,"maximum":120}},"overdueEveryDays":{"default":3,"type":"integer","minimum":1,"maximum":30},"digestHour":{"default":9,"type":"integer","minimum":0,"maximum":23},"timezone":{"default":"America/Toronto","type":"string","minLength":3,"maxLength":60},"taxPrepStartDaysAfterYearEnd":{"default":30,"type":"integer","minimum":0,"maximum":180},"disabledRules":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,60}$"}},"corporateJurisdiction":{"default":null,"anyOf":[{"type":"string","enum":["federal","ON","BC","AB","QC","other"]},{"type":"null"}]},"instalments":{"default":"none","type":"string","enum":["none","monthly","quarterly"]},"payrollEnabled":{"default":false,"type":"boolean"},"constructionServices":{"default":false,"type":"boolean"},"annualReturnMonthDay":{"default":null,"anyOf":[{"type":"string","pattern":"^(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$"},{"type":"null"}]},"employeeCount":{"default":null,"anyOf":[{"type":"string","enum":["none","1-24","25-plus"]},{"type":"null"}]},"postsJobsPublicly":{"default":null,"anyOf":[{"type":"boolean"},{"type":"null"}]},"usesAiScreening":{"default":null,"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false},"inboxAi":{"type":"object","properties":{"reading":{"anyOf":[{"type":"object","properties":{"model":{"type":"string","enum":["openai/gpt-6.1-sol","openai/gpt-6-luna","google/gemini-3.8-flash","zai/glm-5.3-flash"]},"effort":{"type":"string","enum":["low","medium","high"]}},"required":["model","effort"],"additionalProperties":false},{"type":"null"}]},"checking":{"anyOf":[{"type":"object","properties":{"model":{"type":"string","enum":["openai/gpt-6.1-sol","openai/gpt-6-luna","google/gemini-3.8-flash","zai/glm-5.3-flash"]},"effort":{"type":"string","enum":["low","medium","high"]}},"required":["model","effort"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.branding.prepareLogo":{"post":{"summary":"Prepare a private upload for the organization logo used on letterheads, agreements, and invoices. PNG or JPEG up to 2 MB.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_branding_prepareLogo","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.branding.prepareLogo"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","enum":["image/png","image/jpeg"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":2000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.branding.confirmLogo":{"post":{"summary":"Verify an uploaded logo's bytes and hash, then make it the organization letterhead logo.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"platform_branding_confirmLogo","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.branding.confirmLogo"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"storagePath":{"type":"string","minLength":10,"maxLength":500},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"mimeType":{"type":"string","enum":["image/png","image/jpeg"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["storagePath","sha256","mimeType"],"additionalProperties":false}}}}}},"/api/v1/accounting/platform.branding.logo":{"post":{"summary":"Get a short-lived link to the current organization logo.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_branding_logo","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.branding.logo"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived link to the current organization logo.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"platform_branding_logo_get","tags":["platform"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/platform.branding.logo"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliance.items.list":{"post":{"summary":"List compliance checklist items with what to do, why it matters, official citations, statutory and effective due dates, days until due, status, owner and reminder state. Filter by status (upcoming, in_progress, done, skipped, open or all), category, a from/to due-date range, the assigned owner (assigneeUserId) or who assigned it (assignedByUserId).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_items_list","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["upcoming","in_progress","done","skipped","open","all"]},"category":{"type":"string","enum":["corporate_filings","income_tax","sales_tax","payroll","information_returns","bookkeeping","setup","other"]},"from":{"type":"string"},"to":{"type":"string"},"includeDone":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"assigneeUserId":{"type":"string","minLength":1,"maxLength":200},"assignedByUserId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List compliance checklist items with what to do, why it matters, official citations, statutory and effective due dates, days until due, status, owner and reminder state. Filter by status (upcoming, in_progress, done, skipped, open or all), category, a from/to due-date range, the assigned owner (assigneeUserId) or who assigned it (assignedByUserId).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_items_list_get","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["upcoming","in_progress","done","skipped","open","all"]}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["corporate_filings","income_tax","sales_tax","payroll","information_returns","bookkeeping","setup","other"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeDone","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"assigneeUserId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"assignedByUserId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":200,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliance.items.get":{"post":{"summary":"Read one compliance item by id with its full what and why, citations, notes, owner, change history and the reminder emails that included it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_items_get","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one compliance item by id with its full what and why, citations, notes, owner, change history and the reminder emails that included it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_items_get_get","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliance.items.update":{"post":{"summary":"Update a compliance item's status (upcoming, in_progress, done or skipped), notes, owner (assigneeUserId of an active administrator or finance member) or snoozedUntil date. Requires id, expectedRevision and idempotencyKey. Automatic refreshes never overwrite these human decisions.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"compliance_items_update","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"status":{"type":"string","enum":["upcoming","in_progress","done","skipped"]},"notes":{"type":"string","maxLength":4000},"assigneeUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"snoozedUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"notifyOnResume":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/compliance.items.create":{"post":{"summary":"Add a custom compliance checklist item with title, what to do, why, dueDate, category, optional https citations, an optional in-app link (actionHref, a workspace page path starting with /, /finance, /legal or /people) and an optional owner. Custom items get the same reminders as built-in rules. Requires an idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"compliance_items_create","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.items.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"what":{"type":"string","minLength":1,"maxLength":4000},"why":{"default":"","type":"string","maxLength":4000},"dueDate":{"type":"string"},"category":{"default":"other","type":"string","enum":["corporate_filings","income_tax","sales_tax","payroll","information_returns","bookkeeping","other"]},"citations":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["title","url"],"additionalProperties":false}},"actionHref":{"type":"string","maxLength":500,"pattern":"^\\/(?:(?:accounting|ops|inbox|checklist|calendar|ai|compliance|chief-of-staff|logs|history|developers|settings|finance|legal|people|insights)(\\/[A-Za-z0-9_/-]*)?)?(\\?[A-Za-z0-9_.=&%:-]*)?$"},"notes":{"default":"","type":"string","maxLength":4000},"assigneeUserId":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title","what","dueDate"],"additionalProperties":false}}}}}},"/api/v1/accounting/compliance.refresh":{"post":{"summary":"Regenerate compliance obligations from the company profile and reminder settings. Adds new deadlines, updates changed dates and wording, marks untouched items whose rule no longer applies as not applicable with a system note, and never deletes items or changes human status, notes or completion. Requires an idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"compliance_refresh","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.refresh"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/compliance.checklist":{"post":{"summary":"Read the actionable compliance checklist: stored obligations with days until due, summary counts, missing company profile details, assignable members, and related action items from invoices, agreements, contractors, receipts awaiting review, receipt match review and Stripe exceptions. Sources that fail are listed in unavailable.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_checklist","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.checklist"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeDone":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"Read the actionable compliance checklist: stored obligations with days until due, summary counts, missing company profile details, assignable members, and related action items from invoices, agreements, contractors, receipts awaiting review, receipt match review and Stripe exceptions. Sources that fail are listed in unavailable.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_checklist_get","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.checklist"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeDone","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/calendar.events":{"post":{"summary":"List important company dates between from and to (YYYY-MM-DD, at most 400 days): compliance deadlines with what, why, citations and weekend-adjusted dates, plus invoice due dates, agreement expiries and contractor pay runs from other modules. Sources that fail are listed in unavailable.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"calendar_events","tags":["calendar"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/calendar.events"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}}}}},"get":{"summary":"List important company dates between from and to (YYYY-MM-DD, at most 400 days): compliance deadlines with what, why, citations and weekend-adjusted dates, plus invoice due dates, agreement expiries and contractor pay runs from other modules. Sources that fail are listed in unavailable.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"calendar_events_get","tags":["calendar"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/calendar.events"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliance.reminders.preview":{"post":{"summary":"Preview the grouped compliance reminder emails with recipients, subject, HTML and text. Mode upcoming (default) shows every open item within the reminder window, exactly what Send now would queue; mode scheduled shows only what the next daily digest would send. Nothing is sent.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_reminders_preview","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.reminders.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"default":"upcoming","type":"string","enum":["upcoming","scheduled"]}},"additionalProperties":false}}}}},"get":{"summary":"Preview the grouped compliance reminder emails with recipients, subject, HTML and text. Mode upcoming (default) shows every open item within the reminder window, exactly what Send now would queue; mode scheduled shows only what the next daily digest would send. Nothing is sent.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliance_reminders_preview_get","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.reminders.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"mode","in":"query","required":false,"schema":{"default":"upcoming","type":"string","enum":["upcoming","scheduled"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliance.reminders.sendNow":{"post":{"summary":"Queue grouped compliance reminder emails now for every open item within the reminder window, from the reminders identity to the configured recipients or else all active administrators. Records each digest and updates item reminder state. Requires an idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"compliance_reminders_sendNow","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.reminders.sendNow"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/compliance.kickoff.run":{"post":{"summary":"Start tax preparation for a kickoff item now: marks it in progress, prepares the exact corporate or GST/HST workpaper period, adds follow-up checklist items and emails administrators a link that opens that workpaper. Records a compliance.kickoff run with prepare and notify steps. Requires itemId and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"compliance_kickoff_run","tags":["compliance"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliance.kickoff.run"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["itemId"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.templates.list":{"post":{"summary":"List agreement templates: the Contractor Agreement, Non-Disclosure Agreement, Signature Request, and Document with Header starters on company letterhead plus custom templates, with merge fields and signer roles. Set includeArchived to include archived templates.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_list","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List agreement templates: the Contractor Agreement, Non-Disclosure Agreement, Signature Request, and Document with Header starters on company letterhead plus custom templates, with merge fields and signer roles. Set includeArchived to include archived templates.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_list_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.templates.get":{"post":{"summary":"Read one agreement template with its Markdown body, merge fields, signer roles, letterhead setting, and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one agreement template with its Markdown body, merge fields, signer roles, letterhead setting, and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_get_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.templates.preview":{"post":{"summary":"Render a PDF preview of a template (templateId) or unsaved template text (body, fields, signerRoles) with merge values and recipients on the organization letterhead. Returns pdfBase64, the page count, and the labels of required fields that are still empty. Nothing is stored.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_preview","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":200000},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"default":false,"type":"boolean"},"defaultValue":{"type":"string","maxLength":5000},"multiline":{"type":"boolean"},"markdown":{"type":"boolean"},"help":{"type":"string","maxLength":300},"source":{"type":"string","enum":["company","counterparty","contractor","agreement"]},"type":{"type":"string","enum":["date","choice","email","phone","address","job"]},"options":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"allowOther":{"type":"boolean"}},"required":["key","label"],"additionalProperties":false}},"signerRoles":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"label":{"type":"string","minLength":1,"maxLength":80},"partyLabelField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"order":{"type":"integer","minimum":1,"maximum":20},"defaultInternal":{"default":false,"type":"boolean"}},"required":["role","label","partyLabelField","order"],"additionalProperties":false}},"letterhead":{"type":"boolean"},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"logoAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"values":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"additionalProperties":{"type":"string","maxLength":20000}},"recipients":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["signer","cc"]},"signerRole":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"order":{"type":"integer","minimum":1,"maximum":20},"userId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","name","email"],"additionalProperties":false}},"subjectType":{"type":"string","enum":["contractor","party","invoice"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"jobRoleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobRoleVersion":{"type":"integer","minimum":1,"maximum":100000},"engagement":{"type":"object","properties":{"rate":{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","week","month","year","fixed"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},"basis":{"type":"string","enum":["job","one_off"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"noticeDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["rate","basis"],"additionalProperties":false}},"additionalProperties":false}}}}},"get":{"summary":"Render a PDF preview of a template (templateId) or unsaved template text (body, fields, signerRoles) with merge values and recipients on the organization letterhead. Returns pdfBase64, the page count, and the labels of required fields that are still empty. Nothing is stored.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_templates_preview_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"templateId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"title","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"body","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200000}},{"name":"fields","in":"query","required":false,"schema":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"default":false,"type":"boolean"},"defaultValue":{"type":"string","maxLength":5000},"multiline":{"type":"boolean"},"markdown":{"type":"boolean"},"help":{"type":"string","maxLength":300},"source":{"type":"string","enum":["company","counterparty","contractor","agreement"]},"type":{"type":"string","enum":["date","choice","email","phone","address","job"]},"options":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"allowOther":{"type":"boolean"}},"required":["key","label"],"additionalProperties":false}}},{"name":"signerRoles","in":"query","required":false,"schema":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"label":{"type":"string","minLength":1,"maxLength":80},"partyLabelField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"order":{"type":"integer","minimum":1,"maximum":20},"defaultInternal":{"default":false,"type":"boolean"}},"required":["role","label","partyLabelField","order"],"additionalProperties":false}}},{"name":"letterhead","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"footer","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},{"name":"logoAssetId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},{"name":"values","in":"query","required":false,"schema":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"additionalProperties":{"type":"string","maxLength":20000}}},{"name":"recipients","in":"query","required":false,"schema":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["signer","cc"]},"signerRole":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"order":{"type":"integer","minimum":1,"maximum":20},"userId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","name","email"],"additionalProperties":false}}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["contractor","party","invoice"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"jobRoleId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"jobRoleVersion","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100000}},{"name":"engagement","in":"query","required":false,"schema":{"type":"object","properties":{"rate":{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","week","month","year","fixed"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},"basis":{"type":"string","enum":["job","one_off"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"noticeDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["rate","basis"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.templates.create":{"post":{"summary":"Create a custom agreement template from Markdown (body with {{field.key}} merge fields and an optional {{signatures}} block), fields, signerRoles, and letterhead. Set duplicateOf to copy an existing or starter template. It is published and ready to send unless publish is false, which keeps it a draft until signing.templates.publish. Requires an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_templates_create","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"default":"","type":"string","maxLength":1000},"kind":{"default":"custom","type":"string","enum":["nda","contractor_agreement","signature_request","letterhead","custom"]},"body":{"type":"string","minLength":1,"maxLength":200000},"editorJson":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"default":false,"type":"boolean"},"defaultValue":{"type":"string","maxLength":5000},"multiline":{"type":"boolean"},"markdown":{"type":"boolean"},"help":{"type":"string","maxLength":300},"source":{"type":"string","enum":["company","counterparty","contractor","agreement"]},"type":{"type":"string","enum":["date","choice","email","phone","address","job"]},"options":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"allowOther":{"type":"boolean"}},"required":["key","label"],"additionalProperties":false}},"signerRoles":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"label":{"type":"string","minLength":1,"maxLength":80},"partyLabelField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"order":{"type":"integer","minimum":1,"maximum":20},"defaultInternal":{"default":false,"type":"boolean"}},"required":["role","label","partyLabelField","order"],"additionalProperties":false}},"letterhead":{"type":"boolean"},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"logoAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"duplicateOf":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"publish":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.templates.publish":{"post":{"summary":"Publish a draft template with id and expectedRevision so it can be used to send agreements. Templates saved from the agreement writer stay drafts until someone publishes them, and drafts can't be sent. Publishing a template that is already published changes nothing.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_templates_publish","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.publish"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.templates.update":{"post":{"summary":"Edit a custom template with expectedRevision. Starter templates are read-only; duplicate them to customize. Documents already sent keep the exact version they were sent with.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_templates_update","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"kind":{"type":"string","enum":["nda","contractor_agreement","signature_request","letterhead","custom"]},"body":{"type":"string","minLength":1,"maxLength":200000},"editorJson":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"default":false,"type":"boolean"},"defaultValue":{"type":"string","maxLength":5000},"multiline":{"type":"boolean"},"markdown":{"type":"boolean"},"help":{"type":"string","maxLength":300},"source":{"type":"string","enum":["company","counterparty","contractor","agreement"]},"type":{"type":"string","enum":["date","choice","email","phone","address","job"]},"options":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"allowOther":{"type":"boolean"}},"required":["key","label"],"additionalProperties":false}},"signerRoles":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"label":{"type":"string","minLength":1,"maxLength":80},"partyLabelField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"order":{"type":"integer","minimum":1,"maximum":20},"defaultInternal":{"default":false,"type":"boolean"}},"required":["role","label","partyLabelField","order"],"additionalProperties":false}},"letterhead":{"type":"boolean"},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"logoAssetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.templates.archive":{"post":{"summary":"Archive (archived=true) or restore (archived=false) a template with expectedRevision. Archived templates are hidden from new documents but kept for records.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_templates_archive","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.templates.archive"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","archived"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.files.prepare":{"post":{"summary":"Prepare a private upload for an agreement original: filename, mimeType (PDF, Word .docx, PNG, JPEG, text, Markdown; legacy .doc, .odt and .rtf are kept as records only), sizeBytes up to 25 MB, sha256, idempotencyKey. Returns fileId and uploadUrl; if alreadyUploaded is true skip the upload and confirm.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_files_prepare","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.files.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.oasis.opendocument.text","application/rtf","image/png","image/jpeg","text/plain","text/markdown"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":26214400},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.files.confirm":{"post":{"summary":"Confirm an uploaded original by fileId after verifying its size, SHA-256 hash, and file signature. Returns the verified fileId, filename, mimeType, sha256, and sizeBytes for use as an envelope source or executed agreement.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_files_confirm","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.files.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["fileId"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.files.fromGoogleDocs":{"post":{"summary":"Import a Google Docs document by its docs.google.com link as a verified PDF original. Only documents shared publicly (anyone with the link) can be fetched; otherwise download the document as PDF or Word from Google Docs and upload it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_files_fromGoogleDocs","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.files.fromGoogleDocs"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["url"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.list":{"post":{"summary":"List signature envelopes with their status, linked record, recipients' progress, and key dates. Filter by status (including open and attention), templateKey, subjectType and subjectId (for example contractor), or a title/recipient search. Each envelope says whether it is waiting for your own signature (awaitingMe) and, when it is, gives signUrl: the page where you sign it yourself. Pass awaitingMe: true to list only those. Signing only happens there; agents can't sign for you. An envelope made from a job gives the job's title and version and its pay as the agreement states it (pay, rateBasis job or one_off). counts: true also returns how many envelopes each status filter holds.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_list","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["draft","sent","in_progress","changes_requested","completing","completed","declined","voided","expired","open","attention"]},"templateKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,60}$"},"subjectType":{"type":"string","enum":["contractor","party","invoice"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"query":{"type":"string","maxLength":200},"awaitingMe":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"counts":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List signature envelopes with their status, linked record, recipients' progress, and key dates. Filter by status (including open and attention), templateKey, subjectType and subjectId (for example contractor), or a title/recipient search. Each envelope says whether it is waiting for your own signature (awaitingMe) and, when it is, gives signUrl: the page where you sign it yourself. Pass awaitingMe: true to list only those. Signing only happens there; agents can't sign for you. An envelope made from a job gives the job's title and version and its pay as the agreement states it (pay, rateBasis job or one_off). counts: true also returns how many envelopes each status filter holds.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_list_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","sent","in_progress","changes_requested","completing","completed","declined","voided","expired","open","attention"]}},{"name":"templateKey","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,60}$"}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["contractor","party","invoice"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"awaitingMe","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"counts","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.envelopes.get":{"post":{"summary":"Read one envelope with recipients and their signing status (including links locked after too many incorrect codes), documents (original, signable, completed) with SHA-256 hashes, the most recent audit events newest first (hasOlderEvents tells you to page back with signing.events.list), the email log, the actions available now, and for an agreement made from a job, the job version it used (job.version: what it said and paid then) and where that job is now (job.current: its current version and pay, and whether it's archived), with the agreement's pay in envelope.engagement.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one envelope with recipients and their signing status (including links locked after too many incorrect codes), documents (original, signable, completed) with SHA-256 hashes, the most recent audit events newest first (hasOlderEvents tells you to page back with signing.events.list), the email log, the actions available now, and for an agreement made from a job, the job version it used (job.version: what it said and paid then) and where that job is now (job.current: its current version and pay, and whether it's archived), with the agreement's pay in envelope.engagement.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_get_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.envelopes.defaults":{"post":{"summary":"Suggested merge values and recipients for a new document from the company profile, the requesting member, and an optional linked contractor or customer. For a contractor it also says what their agreement in effect sets (title, job role and rate) and whether an update to it is waiting (contractor).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_defaults","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.defaults"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","enum":["contractor","party","invoice"]},"subjectId":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}}},"get":{"summary":"Suggested merge values and recipients for a new document from the company profile, the requesting member, and an optional linked contractor or customer. For a contractor it also says what their agreement in effect sets (title, job role and rate) and whether an update to it is waiting (contractor).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_defaults_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.defaults"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"templateId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["contractor","party","invoice"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.envelopes.createDraft":{"post":{"summary":"Create a draft envelope from a template (templateId or templateKey) or an uploaded file (fileId) with title, message, recipients (signer or cc, signerRole, order, userId for a company signer who signs in Oatmilk), mergeValues, signingOrder (parallel or sequential), deadline, and reminder interval. A template that states pay (like the contractor agreement) is made from a job: jobRoleId and jobRoleVersion (a version from contractorOps.roles.versions), and engagement: the pay as rate {amountMinor (minor units, as a string of digits), currency, unit: hour, day, week, month, year or fixed}, basis job (the version's pay: its currency and unit, within its band) or one_off (a rate for this agreement only, with an optional note), and startDate, endDate and noticeDays. The pay, its currency, the role and the dates are then filled in from these and can't be set through mergeValues. Nothing is sent.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_createDraft","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.createDraft"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"message":{"default":"","type":"string","maxLength":4000},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"templateKey":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,60}$"},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","enum":["contractor","party","invoice"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"mergeValues":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"additionalProperties":{"type":"string","maxLength":20000}},"signingOrder":{"default":"parallel","type":"string","enum":["sequential","parallel"]},"recipients":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["signer","cc"]},"signerRole":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"order":{"type":"integer","minimum":1,"maximum":20},"userId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","name","email"],"additionalProperties":false}},"fields":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"kind":{"type":"string","enum":["signature","initials","name","title","date","email"]},"page":{"type":"integer","minimum":0,"maximum":499},"x":{"type":"number","minimum":0,"maximum":5000},"y":{"type":"number","minimum":0,"maximum":5000},"width":{"type":"number","exclusiveMinimum":0,"maximum":5000},"height":{"type":"number","exclusiveMinimum":0,"maximum":5000}},"required":["role","kind","page","x","y","width","height"],"additionalProperties":false}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"reminderIntervalDays":{"default":3,"type":"integer","minimum":0,"maximum":30},"allowChanges":{"type":"boolean"},"jobRoleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobRoleVersion":{"type":"integer","minimum":1,"maximum":100000},"engagement":{"type":"object","properties":{"rate":{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","week","month","year","fixed"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},"basis":{"type":"string","enum":["job","one_off"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"noticeDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["rate","basis"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.updateDraft":{"post":{"summary":"Edit a draft envelope with expectedRevision, including uploaded-document field positions, and its job (jobRoleId with jobRoleVersion, or both null) and engagement (the structured pay and dates, or null). Changing document content, the job or the pay clears the prepared PDF and its field positions; field placement alone keeps the PDF.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_updateDraft","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.updateDraft"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","maxLength":4000},"templateId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"anyOf":[{"type":"string","enum":["contractor","party","invoice"]},{"type":"null"}]},"subjectId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"mergeValues":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"additionalProperties":{"type":"string","maxLength":20000}},"signingOrder":{"type":"string","enum":["sequential","parallel"]},"recipients":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["signer","cc"]},"signerRole":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"order":{"type":"integer","minimum":1,"maximum":20},"userId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["kind","name","email"],"additionalProperties":false}},"fields":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"kind":{"type":"string","enum":["signature","initials","name","title","date","email"]},"page":{"type":"integer","minimum":0,"maximum":499},"x":{"type":"number","minimum":0,"maximum":5000},"y":{"type":"number","minimum":0,"maximum":5000},"width":{"type":"number","exclusiveMinimum":0,"maximum":5000},"height":{"type":"number","exclusiveMinimum":0,"maximum":5000}},"required":["role","kind","page","x","y","width","height"],"additionalProperties":false}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"reminderIntervalDays":{"type":"integer","minimum":0,"maximum":30},"allowChanges":{"type":"boolean"},"jobRoleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"jobRoleVersion":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000},{"type":"null"}]},"engagement":{"anyOf":[{"type":"object","properties":{"rate":{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","week","month","year","fixed"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},"basis":{"type":"string","enum":["job","one_off"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"noticeDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["rate","basis"],"additionalProperties":false},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.prepare":{"post":{"summary":"Prepare the exact document to be signed: render the template on letterhead, or convert an uploaded Word document, image, text file, or public Google Docs link. Uploaded PDF pages stay intact; senders place signature, initials, date, name, title, or email fields directly on the prepared pages before sending. Stores the PDF privately with its SHA-256 hash and field positions.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_prepare","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"googleDocUrl":{"type":"string","maxLength":2000,"format":"uri"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.send":{"post":{"summary":"Send a prepared draft for signature. Each signer receives a private link by email (company signers are asked to sign in Oatmilk); copied recipients are notified. Sequential envelopes notify the next signers only when earlier signers finish. A document that states pay needs its structured pay first, and a job it names must still be in use. A contractor agreement sent to a linked contractor records its job, pay and dates as an update to their terms that takes effect once everyone signs; only one update can wait at a time, and a new title needs a title change first.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_send","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.send"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.remind":{"post":{"summary":"Email a reminder with a fresh link to signers who can sign now. Limited to one manual reminder per 24 hours; automatic reminders follow the envelope's reminder interval until the deadline.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_remind","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.remind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.resend":{"post":{"summary":"Send a new link to one waiting signer, revoking earlier links and sessions and resetting their verification-code limits. This also unlocks a link that was locked after too many incorrect codes. Optionally correct the signer's name or email, or extend the deadline with expiresAt.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_resend","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.resend"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","recipientId"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.void":{"post":{"summary":"Void a draft, an envelope that is still collecting signatures, an envelope whose finalizing stopped after its automatic attempts, or an imported executed agreement, with a reason. Signing links stop working and people who were notified receive a short notice. Records are kept.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_void","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.void"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.revise":{"post":{"summary":"Answer the changes signers suggested to an envelope that is waiting on them by sending a revised version: decisions has, for each open request id, a decision per suggested change (accepted, rejected, or noted for a comment), optionally with the wording the sender accepts instead (text) and a reply. Accepted changes go into the agreement's text, a new envelope is prepared and sent to every signer again, and the old one is cancelled as replaced; signatures on it stay in its record. Optional reply to all signers and a new deadline (expiresAt). Requires at least one accepted change.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_revise","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.revise"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decisions":{"type":"object","propertyNames":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"additionalProperties":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"decision":{"type":"string","enum":["accepted","rejected","noted"]},"text":{"type":"string","maxLength":5000},"reply":{"type":"string","maxLength":1000}},"required":["itemId","decision"],"additionalProperties":false}}},"reply":{"type":"string","maxLength":2000},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","decisions"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.keep":{"post":{"summary":"Keep an envelope that is waiting on suggested changes as it is: every suggested change is declined with the reply (and optional replies per change), signing resumes where it was, and each person who suggested changes gets the reply with a fresh link.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_keep","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.keep"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"requestIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"reply":{"type":"string","minLength":3,"maxLength":2000},"replies":{"type":"object","propertyNames":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"additionalProperties":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"reply":{"type":"string","minLength":1,"maxLength":1000}},"required":["itemId","reply"],"additionalProperties":false}}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","requestIds","reply"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.retryCompletion":{"post":{"summary":"Retry finalizing an envelope whose completed PDF could not be prepared after 20 automatic attempts, with expectedRevision. Starts a fresh set of attempts right away; the envelope is completed and the completion emails are sent at most once. Recorded in the audit trail.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_retryCompletion","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.retryCompletion"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.download":{"post":{"summary":"Get a short-lived private download for an envelope document: the original upload, the signable PDF, or the completed PDF with its certificate of completion. Downloads are recorded in the audit trail.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_download","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"document":{"default":"completed","type":"string","enum":["original","signable","completed"]}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived private download for an envelope document: the original upload, the signable PDF, or the completed PDF with its certificate of completion. Downloads are recorded in the audit trail.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_download_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"document","in":"query","required":false,"schema":{"default":"completed","type":"string","enum":["original","signable","completed"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.envelopes.certificate":{"post":{"summary":"Render the current certificate and audit trail for an envelope as a PDF (pdfBase64): recipients, verification and signing times, IP addresses, devices, document hashes, and consent text.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_certificate","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.certificate"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Render the current certificate and audit trail for an envelope as a PDF (pdfBase64): recipients, verification and signing times, IP addresses, devices, document hashes, and consent text.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_envelopes_certificate_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.certificate"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.envelopes.importExecuted":{"post":{"summary":"Record an agreement signed outside Oatmilk: fileId from signing.files.confirm (or googleDocUrl), title, executedOn, parties, optional endsOn and linked record (for example subjectType contractor). The original is kept unchanged with its hash and the envelope is marked completed as the agreement on file.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_importExecuted","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.importExecuted"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"fileId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"googleDocUrl":{"type":"string","maxLength":2000,"format":"uri"},"executedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endsOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"parties":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"subjectType":{"type":"string","enum":["contractor","party","invoice"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":4000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title","executedOn","parties"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.envelopes.signAsMember":{"post":{"summary":"Sign as the assigned company signer from a signed-in Oatmilk session (dashboard only, never API keys or agents): consent, typed or drawn signature, name, and title are recorded with the document hash, time, IP address, and device.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"signing_envelopes_signAsMember","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.envelopes.signAsMember"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"consent":{"type":"boolean","const":true},"consentVersion":{"type":"string","pattern":"^[0-9a-z.-]{1,40}$"},"signature":{"oneOf":[{"type":"object","properties":{"method":{"type":"string","const":"typed"},"text":{"type":"string","minLength":1,"maxLength":100},"font":{"type":"string","maxLength":60}},"required":["method","text"],"additionalProperties":false},{"type":"object","properties":{"method":{"type":"string","const":"drawn"},"image":{"type":"string","minLength":40,"maxLength":400000,"pattern":"^data:image\\/png;base64,[A-Za-z0-9+/]+=*$"}},"required":["method","image"],"additionalProperties":false}]},"signedName":{"type":"string","minLength":1,"maxLength":200},"signedTitle":{"type":"string","maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","recipientId","documentSha256","consent","consentVersion","signature","signedName"],"additionalProperties":false}}}}}},"/api/v1/accounting/signing.events.list":{"post":{"summary":"List the audit events of one envelope: created, prepared, sent, email accepted/delivered, viewed, code sent, incorrect code, link locked or unlocked, verified, consented, signed, declined, reminded, resent, voided, expired, finalizing stopped or restarted, completed, downloaded. order oldest (default) pages forward with afterId; order newest pages back from the latest event with beforeId. Returns hasMore.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_events_list","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.events.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"order":{"default":"oldest","type":"string","enum":["oldest","newest"]},"afterId":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"beforeId":{"type":"integer","minimum":1,"maximum":9007199254740991},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500}},"required":["envelopeId"],"additionalProperties":false}}}}},"get":{"summary":"List the audit events of one envelope: created, prepared, sent, email accepted/delivered, viewed, code sent, incorrect code, link locked or unlocked, verified, consented, signed, declined, reminded, resent, voided, expired, finalizing stopped or restarted, completed, downloaded. order oldest (default) pages forward with afterId; order newest pages back from the latest event with beforeId. Returns hasMore.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_events_list_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.events.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"envelopeId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"order","in":"query","required":false,"schema":{"default":"oldest","type":"string","enum":["oldest","newest"]}},{"name":"afterId","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"beforeId","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":200,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/signing.subjects.search":{"post":{"summary":"Search contractors and customers to link to an agreement and prefill the other party's details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_subjects_search","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.subjects.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","maxLength":200},"type":{"type":"string","enum":["contractor","party"]},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}}},"get":{"summary":"Search contractors and customers to link to an agreement and prefill the other party's details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"signing_subjects_search_get","tags":["signing"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/signing.subjects.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["contractor","party"]}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/parties.list":{"post":{"summary":"List customers and vendors (accounts) with their jurisdiction, tax treatment, open balance by currency, overdue count, and last invoice. Filter by search text or kind.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_list","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"search":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["customer","vendor","both"]},"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"archivedOnly":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List customers and vendors (accounts) with their jurisdiction, tax treatment, open balance by currency, overdue count, and last invoice. Filter by search text or kind.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_list_get","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["customer","vendor","both"]}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"archivedOnly","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/parties.search":{"post":{"summary":"Quickly find customers and vendors by name, legal name, or email for pickers. Returns names, contact email, currency, and the last invoice date.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_search","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"default":"","type":"string","maxLength":200},"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":10,"type":"integer","minimum":1,"maximum":25}},"additionalProperties":false}}}}},"get":{"summary":"Quickly find customers and vendors by name, legal name, or email for pickers. Returns names, contact email, currency, and the last invoice date.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_search_get","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":false,"schema":{"default":"","type":"string","maxLength":200}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":25}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/parties.get":{"post":{"summary":"Read one customer or vendor with contacts, address, jurisdiction, tax treatment, default currency and payment terms, preferred payment methods, metadata, external links, invoice history, and schedules.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_get","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one customer or vendor with contacts, address, jurisdiction, tax treatment, default currency and payment terms, preferred payment methods, metadata, external links, invoice history, and schedules.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_get_get","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/parties.create":{"post":{"summary":"Create a customer or vendor account with displayName, optional legal name, contacts, address, jurisdiction (for example CA-ON), tax treatment, currency, payment terms, preferred payment methods, invoice prefix, metadata, and an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"parties_create","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["customer","vendor","both"]},"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"contacts":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"default":"","type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"primary":{"default":false,"type":"boolean"},"billing":{"default":false,"type":"boolean"}},"additionalProperties":false}},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":60}},"additionalProperties":false},"jurisdiction":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}(?:-[A-Z0-9]{1,3})?$"},{"type":"null"}]},"taxTreatment":{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none"]},"taxRateCode":{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"paymentTerms":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},{"type":"null"}]},"preferredPaymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"invoicePrefix":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{1,12}$"},{"type":"null"}]},"notes":{"type":"string","maxLength":5000},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9 _.-]{0,59}$"},"additionalProperties":{"type":"string","maxLength":500}},"external":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"additionalProperties":{"type":"string","maxLength":300}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["displayName"],"additionalProperties":false}}}}}},"/api/v1/accounting/parties.update":{"post":{"summary":"Update a customer or vendor account with its expectedRevision and idempotency key. Existing invoices keep the details that were printed on them.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"parties_update","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["customer","vendor","both"]},"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"contacts":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"name":{"default":"","type":"string","maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"primary":{"default":false,"type":"boolean"},"billing":{"default":false,"type":"boolean"}},"additionalProperties":false}},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","maxLength":60}},"additionalProperties":false},"jurisdiction":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}(?:-[A-Z0-9]{1,3})?$"},{"type":"null"}]},"taxTreatment":{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none"]},"taxRateCode":{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"paymentTerms":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},{"type":"null"}]},"preferredPaymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"invoicePrefix":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{1,12}$"},{"type":"null"}]},"notes":{"type":"string","maxLength":5000},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9 _.-]{0,59}$"},"additionalProperties":{"type":"string","maxLength":500}},"external":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"additionalProperties":{"type":"string","maxLength":300}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/parties.archive":{"post":{"summary":"Archive or restore a customer or vendor with its expectedRevision. Archived accounts keep their history but can't receive new invoices. Archiving is refused while a recurring invoice, payment plan, or scheduled invoice would still go out to them automatically; pause or cancel those schedules and clear or void those invoices first.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"parties_archive","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.archive"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"archived":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/parties.preview":{"post":{"summary":"A short snapshot of one customer or vendor for a hover card or a quick answer: name, kind, location, billing contact, what Oatmilk found about them online (description, industry, website and the pages it came from), what they owe by currency and how much of it is overdue, their last invoice, how many invoices they have had, what they were billed and paid over the last 12 months, and how many days they usually take to pay.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_preview","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"A short snapshot of one customer or vendor for a hover card or a quick answer: name, kind, location, billing contact, what Oatmilk found about them online (description, industry, website and the pages it came from), what they owe by currency and how much of it is overdue, their last invoice, how many invoices they have had, what they were billed and paid over the last 12 months, and how many days they usually take to pay.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"parties_preview_get","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/parties.enrich":{"post":{"summary":"Look a customer or vendor up on the web and save what their own website says: a one-line description, their industry and website, each backed by a quote from a page. Only the name, the website or billing email's domain, and the city leave Oatmilk; never amounts, invoices or contacts. Runs in the background and returns a run id; the result appears on the customer as profile. Nothing a person entered is overwritten. Skips a lookup made in the last 7 days unless force is true.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"parties_enrich","tags":["parties"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/parties.enrich"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"force":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/paymentMethods.list":{"post":{"summary":"List the organization's receiving payment methods (bank transfer in CAD or USD, international wire, Interac e-Transfer, pay-online links, other instructions) that can be printed on invoices.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"paymentMethods_list","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeInactive":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List the organization's receiving payment methods (bank transfer in CAD or USD, international wire, Interac e-Transfer, pay-online links, other instructions) that can be printed on invoices.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"paymentMethods_list_get","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeInactive","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/paymentMethods.wiseOptions":{"post":{"summary":"List issued, active Wise Business receiving details for an administrator to review before adding them to invoice payment methods. Never returns unissued or deprecated details.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"paymentMethods_wiseOptions","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.wiseOptions"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List issued, active Wise Business receiving details for an administrator to review before adding them to invoice payment methods. Never returns unissued or deprecated details.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"paymentMethods_wiseOptions_get","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.wiseOptions"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/paymentMethods.save":{"post":{"summary":"Create or update an organization payment method with kind, label, currency, validated banking details, active flag, and whether it is a default for its currency. Updates need expectedRevision. Administrator only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"paymentMethods_save","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["bank_transfer_cad","bank_transfer_usd","wire","interac","pay_link","other"]},"label":{"type":"string","minLength":1,"maxLength":120},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"details":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{}},"active":{"type":"boolean"},"defaultForCurrency":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","label","details"],"additionalProperties":false}}}}}},"/api/v1/accounting/paymentMethods.archive":{"post":{"summary":"Deactivate an organization payment method with its expectedRevision so it is no longer offered on new invoices. Issued invoices keep their printed details. Administrator only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"paymentMethods_archive","tags":["paymentMethods"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/paymentMethods.archive"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.list":{"post":{"summary":"List invoices with number, customer, project, dates, totals, balance due, and status. Filter by status (including open, unpaid, upcoming and needs_action: awaiting approval, ready to send by hand, or late), overdue, customer, project (or none), currency, source (manual, duplicate, recurring, plan, import), schedule, issue or due date range, or search text. Archived invoices are left out unless archived is only or include. Sort by issued, due, amount, number, updated or created. Overdue is derived from the due date and remaining balance.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_list","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["draft","scheduled","awaiting_approval","approved","sent","partially_paid","paid","overdue","void","uncollectible","open","upcoming","unpaid","needs_action"]},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scheduleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","const":"none"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"source":{"type":"string","enum":["manual","duplicate","recurring","plan","import"]},"archived":{"default":"exclude","type":"string","enum":["exclude","only","include"]},"from":{"type":"string"},"to":{"type":"string"},"dueFrom":{"type":"string"},"dueTo":{"type":"string"},"search":{"type":"string","maxLength":200},"overdue":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"sort":{"type":"string","enum":["issued","due","amount","number","updated","created"]},"direction":{"type":"string","enum":["asc","desc"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List invoices with number, customer, project, dates, totals, balance due, and status. Filter by status (including open, unpaid, upcoming and needs_action: awaiting approval, ready to send by hand, or late), overdue, customer, project (or none), currency, source (manual, duplicate, recurring, plan, import), schedule, issue or due date range, or search text. Archived invoices are left out unless archived is only or include. Sort by issued, due, amount, number, updated or created. Overdue is derived from the due date and remaining balance.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_list_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","scheduled","awaiting_approval","approved","sent","partially_paid","paid","overdue","void","uncollectible","open","upcoming","unpaid","needs_action"]}},{"name":"partyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"scheduleId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"projectId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","const":"none"}]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["manual","duplicate","recurring","plan","import"]}},{"name":"archived","in":"query","required":false,"schema":{"default":"exclude","type":"string","enum":["exclude","only","include"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueFrom","in":"query","required":false,"schema":{"type":"string"}},{"name":"dueTo","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["issued","due","amount","number","updated","created"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.summary":{"post":{"summary":"What the invoice list adds up to right now: what customers owe per currency and how much of it is overdue, what was paid in the last 30 days, and how many invoices need action, are overdue, are drafts, wait for approval, or are archived. Archived invoices are counted only as archived.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_summary","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"What the invoice list adds up to right now: what customers owe per currency and how much of it is overdue, what was paid in the last 30 days, and how many invoices need action, are overdue, are drafts, wait for approval, or are archived. Archived invoices are counted only as archived.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_summary_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.projectSuggestions":{"post":{"summary":"Suggest which project (a project tag) an invoice belongs to. With id, the top suggestions for that invoice with their reasons; without, recent invoices that have no project and the best suggestion for each. Reasons are the customer's other invoices, invoices of the same recurring schedule or payment plan, the invoice it was duplicated from, the project tag on the bank deposit that paid it, the project's name, aliases or keywords in the title, lines or memo, and the issue date falling inside the project's dates. Suggestions are never applied by themselves; use invoices.setProject.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_projectSuggestions","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.projectSuggestions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"Suggest which project (a project tag) an invoice belongs to. With id, the top suggestions for that invoice with their reasons; without, recent invoices that have no project and the best suggestion for each. Reasons are the customer's other invoices, invoices of the same recurring schedule or payment plan, the invoice it was duplicated from, the project tag on the bank deposit that paid it, the project's name, aliases or keywords in the title, lines or memo, and the issue date falling inside the project's dates. Suggestions are never applied by themselves; use invoices.setProject.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_projectSuggestions_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.projectSuggestions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.projectTotals":{"post":{"summary":"Invoiced revenue per project and currency: how much was invoiced, collected and is still owed, and how many invoices, for issued invoices that aren't cancelled. Filter by projectIds and an issue-date range. Pair with tags.report for the project's spend and income from transactions.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_projectTotals","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.projectTotals"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false}}}}},"get":{"summary":"Invoiced revenue per project and currency: how much was invoiced, collected and is still owed, and how many invoices, for issued invoices that aren't cancelled. Filter by projectIds and an issue-date range. Pair with tags.report for the project's spend and income from transactions.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_projectTotals_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.projectTotals"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"projectIds","in":"query","required":false,"schema":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.get":{"post":{"summary":"Read one invoice with its lines, taxes, totals, payments, balance due, printed customer and sender details, schedule, and approval and delivery history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one invoice with its lines, taxes, totals, payments, balance due, printed customer and sender details, schedule, and approval and delivery history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_get_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.lastForParty":{"post":{"summary":"Get the most recent invoice for a customer and a starting template (lines, currency, notes, payment methods, terms, tax) for creating a similar invoice.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_lastForParty","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.lastForParty"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["partyId"],"additionalProperties":false}}}}},"get":{"summary":"Get the most recent invoice for a customer and a starting template (lines, currency, notes, payment methods, terms, tax) for creating a similar invoice.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_lastForParty_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.lastForParty"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"partyId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.pdf":{"post":{"summary":"Get a short-lived link to an issued invoice PDF and its SHA-256 hash.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_pdf","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.pdf"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived link to an issued invoice PDF and its SHA-256 hash.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_pdf_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.pdf"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.taxPlace":{"post":{"summary":"Work out where a customer is for sales tax. With query, the places a typed city, town, province, postal code or country can mean (Toronto, Gimli MB, M5V 2T6, London UK), each with its jurisdiction such as CA-ON; a name Oatmilk doesn't know is read by AI that has no tools and never picks the tax. With partyId, a web search for the customer's head office by its name and website, returning the place only when a quote on the page it came from says it, with that page and quote. Only the name, the website or billing email's domain, and the city leave Oatmilk. Nothing is saved; set the customer's address or the invoice's tax to use the place.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_taxPlace","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.taxPlace"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"query":{"type":"string","minLength":2,"maxLength":120}},"additionalProperties":false}}}}},"get":{"summary":"Work out where a customer is for sales tax. With query, the places a typed city, town, province, postal code or country can mean (Toronto, Gimli MB, M5V 2T6, London UK), each with its jurisdiction such as CA-ON; a name Oatmilk doesn't know is read by AI that has no tools and never picks the tax. With partyId, a web search for the customer's head office by its name and website, returning the place only when a quote on the page it came from says it, with that page and quote. Only the name, the website or billing email's domain, and the city leave Oatmilk. Nothing is saved; set the customer's address or the invoice's tax to use the place.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_taxPlace_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.taxPlace"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"partyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":120}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.preview":{"post":{"summary":"Render a PDF preview of a saved invoice or an unsaved draft without changing anything. Returns base64 PDF bytes, the number it would receive, and computed totals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_preview","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"draft":{"type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","maxLength":200},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"billToContactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["partyId"],"additionalProperties":false}},"additionalProperties":false}}}}},"get":{"summary":"Render a PDF preview of a saved invoice or an unsaved draft without changing anything. Returns base64 PDF bytes, the number it would receive, and computed totals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_preview_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"draft","in":"query","required":false,"schema":{"type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","maxLength":200},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"billToContactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["partyId"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.numbering.preview":{"post":{"summary":"Preview the next invoice number using the saved or a proposed number pattern and next-number setting.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_numbering_preview","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.numbering.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"type":"string","maxLength":60},"nextNumber":{"type":"integer","minimum":1,"maximum":999999999},"issueDate":{"type":"string"},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"Preview the next invoice number using the saved or a proposed number pattern and next-number setting.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_numbering_preview_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.numbering.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"pattern","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"nextNumber","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":999999999}},{"name":"issueDate","in":"query","required":false,"schema":{"type":"string"}},{"name":"partyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.create":{"post":{"summary":"Create a draft invoice for a customer. By default it starts from the customer's last invoice (lines, currency, notes, payment methods, terms); pass startFrom blank to start empty. Totals and sales tax are calculated on the server. Pass projectId to tie it to a project.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_create","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"startFrom":{"default":"last","type":"string","enum":["last","blank"]},"title":{"type":"string","maxLength":200},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"billToContactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["partyId"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.update":{"post":{"summary":"Edit a draft, scheduled, or awaiting-approval invoice with its expectedRevision. Editing an approved invoice returns it for approval. Issued invoices can't be edited; void and duplicate them instead. Their memo and project (projectId) can still change.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_update","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","maxLength":200},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"billToContactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.duplicate":{"post":{"summary":"Create a new draft from an existing invoice, or from a customer's last invoice when partyId is given. The new draft keeps the source invoice's project.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_duplicate","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.duplicate"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.archive":{"post":{"summary":"Archive or restore up to 100 invoices at once with ids and archived (true to archive, false to restore). Archived invoices leave the invoice lists and counts but stay in the customer's history, reports and payments. Drafts and prepared invoices without a send date, paid, written-off and cancelled invoices can be archived; an invoice that is still owed or set to go out on a date is skipped with a reason (record the payment or write off the balance, or clear the send date, first). An archived invoice can't be approved, sent, paid, edited or cancelled until it is restored. Returns the invoices changed and, for each one left alone, why.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_archive","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.archive"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"archived":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["ids"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.setProject":{"post":{"summary":"Tie up to 100 invoices to a project (a project tag's id from tags.list) or clear it with projectId null. Works on issued invoices too, because the project is internal and never printed. Archived projects can't be chosen. Returns the invoices changed and any left alone.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_setProject","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.setProject"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["ids","projectId"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.import":{"post":{"summary":"Record an invoice issued outside the platform with its original number, dates, lines, taxes, and status (sent, paid, or void) so it appears in customer history. Paid imports record a matching payment.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_import","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.import"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string","minLength":1,"maxLength":60},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":"string","maxLength":200},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"null"}]},"taxes":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"rate":{"default":"0","type":"string","pattern":"^\\d{1,3}(?:\\.\\d{1,4})?$"},"amountMinor":{"type":"string","pattern":"^\\d{1,18}$"}},"required":["label","amountMinor"],"additionalProperties":false}},"notes":{"type":"string","maxLength":4000},"status":{"default":"sent","type":"string","enum":["sent","paid","void"]},"sentOn":{"type":"string"},"paidOn":{"type":"string"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["partyId","number","issueDate","lines"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.filesPrepare":{"post":{"summary":"Prepare an invoice file upload (PDF, Word, image, CSV, or email up to 20 MB). Supply filename, mimeType, sizeBytes, sha256, and idempotencyKey. Upload unchanged bytes to the returned uploadUrl unless alreadyUploaded is true.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_filesPrepare","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.filesPrepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","maxLength":150},"sizeBytes":{"type":"integer","minimum":1,"maximum":20971520},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.filesExtract":{"post":{"summary":"Read an uploaded invoice file and return extracted invoice candidates with suggested customers. For CSV files, first call without csvMapping to get headers, then call again with the confirmed column mapping.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_filesExtract","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.filesExtract"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","maxLength":150},"csvMapping":{"anyOf":[{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string","minLength":1,"maxLength":200},"dueDate":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"customer":{"type":"string","minLength":1,"maxLength":200},"total":{"type":"string","minLength":1,"maxLength":200},"currency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"status":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["number","issueDate","dueDate","customer","total","currency","status","description"],"additionalProperties":false},{"type":"null"}]}},"required":["sha256","filename","mimeType"],"additionalProperties":false}}}}},"get":{"summary":"Read an uploaded invoice file and return extracted invoice candidates with suggested customers. For CSV files, first call without csvMapping to get headers, then call again with the confirmed column mapping.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_filesExtract_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.filesExtract"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"sha256","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"filename","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"mimeType","in":"query","required":true,"schema":{"type":"string","maxLength":150}},{"name":"csvMapping","in":"query","required":false,"schema":{"anyOf":[{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string","minLength":1,"maxLength":200},"dueDate":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"customer":{"type":"string","minLength":1,"maxLength":200},"total":{"type":"string","minLength":1,"maxLength":200},"currency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"status":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["number","issueDate","dueDate","customer","total","currency","status","description"],"additionalProperties":false},{"type":"null"}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.filesCommit":{"post":{"summary":"Import reviewed invoice files with their original numbers, dates, lines, taxes, and status. Paid imports record a matching payment and PDFs become the invoice's permanent file. Nothing is emailed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_filesCommit","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.filesCommit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","maxLength":150},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newPartyName":{"type":"string","minLength":1,"maxLength":200},"number":{"type":"string","minLength":1,"maxLength":60},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":4000},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"taxes":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"rate":{"default":"0","type":"string","pattern":"^\\d{1,3}(?:\\.\\d{1,4})?$"},"amountMinor":{"type":"string","pattern":"^\\d{1,18}$"}},"required":["label","amountMinor"],"additionalProperties":false}},"status":{"default":"sent","type":"string","enum":["sent","paid","void"]}},"required":["sha256","filename","mimeType","number","issueDate","lines"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["items"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.issue":{"post":{"summary":"Issue a draft: assign the next invoice number, freeze the customer, sender, and payment details, and store the final PDF with its SHA-256 hash. Issuing does not email anyone.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_issue","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.issue"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"issueDate":{"type":"string"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.send":{"post":{"summary":"Send an invoice to the customer's billing contacts from the invoices sender identity with the PDF attached, issuing it first if needed. The email is queued and the invoice marked sent together, and an invoice's first email goes out only once; sending an already-sent invoice again is a deliberate resend. Use method manual to record that you delivered it yourself.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_send","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.send"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"method":{"default":"email","type":"string","enum":["email","manual"]},"issueDate":{"type":"string"},"to":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"message":{"type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.remind":{"post":{"summary":"Email the customer a payment reminder for an issued, unpaid invoice with the PDF attached.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_remind","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.remind"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"to":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"message":{"type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedule":{"post":{"summary":"Set or clear the date an invoice is sent. Scheduling approves it and it is sent automatically on that date unless autoSend is false; pass review true to have administrators asked to review it a few days before instead.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedule","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedule"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sendDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoSend":{"default":true,"type":"boolean"},"review":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","sendDate"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.approve":{"post":{"summary":"Approve a prepared invoice so it can be sent on its scheduled date. Invoices prepared by schedules and payment plans are never sent without approval.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_approve","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.approve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.void":{"post":{"summary":"Void an invoice with a reason. Invoices with recorded payments must have those payments removed first. Voided invoices stay on record.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_void","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.void"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.markUncollectible":{"post":{"summary":"Mark an issued, unpaid invoice as uncollectible with a reason, or reopen it with uncollectible false.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_markUncollectible","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.markUncollectible"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"uncollectible":{"default":true,"type":"boolean"},"reason":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.recordPayment":{"post":{"summary":"Record a full or partial payment on an issued invoice with amountMinor in the invoice currency, paid date, method, reference, and an optional bank transaction. Optionally write off a small remaining balance such as wire fees. Updates the balance and paid status.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_recordPayment","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.recordPayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"invoiceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"amountMinor":{"type":"string","pattern":"^\\d{1,18}$"},"paidOn":{"type":"string"},"method":{"default":"bank_transfer","type":"string","enum":["bank_transfer","wire","interac","card","cheque","cash","pay_link","other"]},"reference":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":1000},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"writeOffRemainder":{"default":false,"type":"boolean"},"writeOffReason":{"type":"string","maxLength":300},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["invoiceId","expectedRevision","amountMinor","paidOn"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.removePayment":{"post":{"summary":"Remove a recorded payment with a reason. The payment stays in history as reversed and the invoice balance and status are recalculated.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_removePayment","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.removePayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"invoiceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"paymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":3,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["invoiceId","expectedRevision","paymentId","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.correctTax":{"post":{"summary":"Correct how an issued invoice imported from outside Oatmilk splits its unchanged total into subtotal and sales tax, without voiding it: pass id, expectedRevision, taxes (up to 5 lines of label, rate in percent, and amountMinor; an empty list means no sales tax), a reason of 10 to 500 characters, and an idempotency key. The tax becomes the sum of the lines and the subtotal the total minus that tax, which moves onto the invoice's single line. The total, payments, status, number, dates, and PDF don't change, and the reason and the split before and after are kept in the audit history. Refused for invoices Oatmilk issued (void and duplicate those instead), void or uncollectible invoices, invoices with more than one line or a quantity other than 1, and taxes above the total. Administrator only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_correctTax","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.correctTax"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"taxes":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"rate":{"type":"string","pattern":"^\\d{1,3}(?:\\.\\d{1,4})?$"},"amountMinor":{"type":"string","pattern":"^\\d{1,18}$"}},"required":["label","rate","amountMinor"],"additionalProperties":false}},"reason":{"type":"string","minLength":10,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","taxes","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.list":{"post":{"summary":"List recurring invoices and payment plans with their cadence, next date, review lead time, auto-send setting, status, and generated invoices.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_schedules_list","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["active","paused","completed","cancelled"]},"kind":{"type":"string","enum":["recurring","plan"]},"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List recurring invoices and payment plans with their cadence, next date, review lead time, auto-send setting, status, and generated invoices.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"invoices_schedules_list_get","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","paused","completed","cancelled"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["recurring","plan"]}},{"name":"partyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/invoices.schedules.create":{"post":{"summary":"Create a recurring invoice for a customer from a template with a weekly, monthly, or yearly cadence, start date, optional end date or number of occurrences, review lead days, and auto-send after approval.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_create","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":200},"template":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["lines"],"additionalProperties":false},"cadence":{"type":"object","properties":{"unit":{"type":"string","enum":["week","month","year"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":24},"dayOfMonth":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]}},"required":["unit"],"additionalProperties":false},"startDate":{"type":"string"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrences":{"anyOf":[{"type":"integer","minimum":1,"maximum":240},{"type":"null"}]},"reviewLeadDays":{"type":"integer","minimum":0,"maximum":60},"autoSendAfterApproval":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["partyId","name","template","cadence","startDate"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.update":{"post":{"summary":"Update a recurring invoice's name, template, cadence, next date, end, review lead days, or auto-send setting with its expectedRevision. Already prepared invoices are not changed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_update","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":200},"template":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["lines"],"additionalProperties":false},"cadence":{"type":"object","properties":{"unit":{"type":"string","enum":["week","month","year"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":24},"dayOfMonth":{"anyOf":[{"type":"integer","minimum":1,"maximum":31},{"type":"null"}]}},"required":["unit"],"additionalProperties":false},"nextRunDate":{"type":"string"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrencesRemaining":{"anyOf":[{"type":"integer","minimum":0,"maximum":240},{"type":"null"}]},"reviewLeadDays":{"type":"integer","minimum":0,"maximum":60},"autoSendAfterApproval":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.pause":{"post":{"summary":"Pause a recurring invoice or payment plan. Nothing new is prepared or sent from it while paused.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_pause","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.pause"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.resume":{"post":{"summary":"Resume a paused recurring invoice or payment plan. Missed dates are skipped, not back-filled. The customer must not be archived.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_resume","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.resume"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.cancel":{"post":{"summary":"Cancel a recurring invoice or payment plan. Its unissued upcoming invoices are voided; issued invoices that weren't sent keep their number but are no longer sent automatically.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_cancel","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.cancel"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.schedules.generate":{"post":{"summary":"Prepare the next invoice of a recurring schedule now, ahead of its review window. It still needs approval before it is sent.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_schedules_generate","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.schedules.generate"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.plans.create":{"post":{"summary":"Create a payment plan that splits a project into 2 to 12 installment invoices on set dates, by percentages or exact pre-tax amounts that add up to the subtotal. Each installment is prepared ahead of time and needs approval before it is sent.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_plans_create","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.plans.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":200},"template":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":64},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"string"},"unitAmountMinor":{"type":"string","pattern":"^-?\\d{1,18}$"},"isHeader":{"type":"boolean"},"taxCode":{"type":"string","enum":["standard","exempt","zero_rated"]}},"required":["description"],"additionalProperties":false}},"notes":{"type":"string","maxLength":4000},"memo":{"type":"string","maxLength":4000},"paymentMethodIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"taxTreatment":{"anyOf":[{"type":"string","enum":["auto","hst","gst","gst_qst","zero_rated","exempt","none","custom"]},{"type":"null"}]},"taxRateCode":{"anyOf":[{"anyOf":[{"type":"string","enum":["HST_13","HST_14","HST_15"]},{"type":"string","pattern":"^RATE_(?:100|[1-9]?\\d(?:\\.\\d{0,2}[1-9])?)$"}]},{"type":"null"}]},"terms":{"type":"object","properties":{"code":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","custom","split_50_50","monthly"]},"days":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]}},"required":["code"],"additionalProperties":false},"payUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["lines"],"additionalProperties":false},"installments":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"percent":{"type":"string","maxLength":9},"amountMinor":{"type":"string","pattern":"^\\d{1,18}$"},"label":{"type":"string","maxLength":120}},"required":["date"],"additionalProperties":false}},"reviewLeadDays":{"type":"integer","minimum":0,"maximum":60},"autoSendAfterApproval":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["partyId","name","template","installments"],"additionalProperties":false}}}}}},"/api/v1/accounting/invoices.automation.run":{"post":{"summary":"Run invoice automation now for this organization: prepare due recurring invoices, request reviews, send approved invoices due today, and remind administrators about approvals. Administrator only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"invoices_automation_run","tags":["invoices"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/invoices.automation.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.list":{"post":{"summary":"List available connectors grouped as financial (Stripe, Wise), data (Notion), and communication (email delivery), with connection status and capabilities. Organization admins manage provider credentials in Settings; secret values are never returned.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_list","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"live":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List available connectors grouped as financial (Stripe, Wise), data (Notion), and communication (email delivery), with connection status and capabilities. Organization admins manage provider credentials in Settings; secret values are never returned.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_list_get","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"live","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/connectors.get":{"post":{"summary":"Read one connector's status and non-secret configuration. For Notion this includes the mapped invoice, customer, vendor, and contact databases, property and status mappings, sync settings, and the last sync summary.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_get","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.get"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","enum":["stripe","wise","notion","email"]}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one connector's status and non-secret configuration. For Notion this includes the mapped invoice, customer, vendor, and contact databases, property and status mappings, sync settings, and the last sync summary.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_get_get","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.get"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","enum":["stripe","wise","notion","email"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/connectors.test":{"post":{"summary":"Check a connector's connection now and record the result. For Notion this verifies the integration token and returns the workspace and integration name.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"connectors_test","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.test"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","enum":["stripe","wise","notion","email"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.credentials.save":{"post":{"summary":"Store organization-scoped Stripe, Wise, or Notion credentials from the administrator dashboard. Values are encrypted server-side, never returned, and replace the prior credentials after verification. Requires idempotencyKey and the current revision when replacing.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_credentials_save","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.credentials.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"id":{"type":"string","const":"stripe"},"readKey":{"type":"string","maxLength":512,"pattern":"^rk_(test|live)_[A-Za-z0-9]+$"},"accountId":{"type":"string","pattern":"^acct_[A-Za-z0-9]+$"},"livemode":{"type":"boolean"},"webhookSecret":{"type":"string","maxLength":512,"pattern":"^whsec_[A-Za-z0-9]+$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","readKey","accountId","livemode","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"wise"},"readToken":{"type":"string","minLength":20,"maxLength":2048},"payoutToken":{"type":"string","minLength":20,"maxLength":2048},"scaPrivateKey":{"type":"string","maxLength":8000},"environment":{"type":"string","enum":["sandbox","production"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","readToken","environment","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"notion"},"token":{"type":"string","minLength":20,"maxLength":1024},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","token","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/connectors.credentials.remove":{"post":{"summary":"Disconnect organization-scoped Stripe, Wise, Notion or Google Drive credentials from the administrator dashboard. Existing accounting records remain. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"connectors_credentials_remove","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.credentials.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","enum":["stripe","wise","notion","google_drive"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.googleDrive.status":{"post":{"summary":"Read whether Google Drive can be connected here (configured), whether it is connected, and the Google account that connected it. Never returns a token.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_googleDrive_status","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.googleDrive.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read whether Google Drive can be connected here (configured), whether it is connected, and the Google account that connected it. Never returns a token.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_googleDrive_status_get","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.googleDrive.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/connectors.googleDrive.connect":{"post":{"summary":"Start connecting the company's Google Drive with read-only access: returns url, the Google consent page for the admin to open while signed in to Oatmilk (only the admin who asked can finish it, within ten minutes). Optional returnTo is an Oatmilk path to come back to. Once connected, import files and folders with dataSources.import (source google_drive; target company_documents to file incorporation papers and fill the company profile). Disconnect with connectors.credentials.remove (id google_drive).","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_googleDrive_connect","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.googleDrive.connect"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"returnTo":{"type":"string","maxLength":300}},"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.wise.statementAccess":{"post":{"summary":"Read whether Wise's monthly statement PDFs reach Oatmilk: the state (working, waiting, needs a signing key, key not in Wise, refused, not found), how many are kept, when Oatmilk last approved Wise's strong customer authentication and when Wise will ask again (about every 90 days; Oatmilk approves it automatically with the saved signing key), the last refusal, and the saved key's public half to add in Wise. The private key is never returned.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_wise_statementAccess","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.wise.statementAccess"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read whether Wise's monthly statement PDFs reach Oatmilk: the state (working, waiting, needs a signing key, key not in Wise, refused, not found), how many are kept, when Oatmilk last approved Wise's strong customer authentication and when Wise will ask again (about every 90 days; Oatmilk approves it automatically with the saved signing key), the last refusal, and the saved key's public half to add in Wise. The private key is never returned.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"connectors_wise_statementAccess_get","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.wise.statementAccess"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/connectors.wise.statements.check":{"post":{"summary":"Ask Wise for statement PDFs now without waiting out a refusal: one month per synced balance, oldest missing first, signing Wise's approval request with the saved key when Wise asks. Returns what was kept and the statement access status. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"connectors_wise_statements_check","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.wise.statements.check"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.wise.signingKey.create":{"post":{"summary":"Create a signing key for Wise's strong customer authentication from the administrator dashboard. The private half is saved encrypted with the Wise credential; only the public half is returned, to add in Wise (Settings › API tokens › Manage public keys). A saved key is replaced only with replace true, because payouts sign with the same key. Requires the credential's expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"connectors_wise_signingKey_create","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.wise.signingKey.create"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"replace":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/connectors.update":{"post":{"summary":"Save Notion connector settings: database mappings (data source, property mapping, status option mapping) for invoices, customers, vendors, and contacts, and sync settings. Mappings are validated against the live Notion schema. Supply idempotencyKey and optionally expectedRevision.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"connectors_update","tags":["connectors"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/connectors.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","const":"notion"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"config":{"type":"object","properties":{"databases":{"type":"object","propertyNames":{"type":"string","enum":["invoices","companies","vendors","contacts"]},"additionalProperties":{"anyOf":[{"type":"object","properties":{"dataSourceId":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"default":"","type":"string","maxLength":300},"url":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"properties":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z]{2,40}$"},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"statusOptions":{"default":{},"type":"object","propertyNames":{"type":"string","enum":["draft","sent","partially_paid","paid","overdue","void"]},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"defaultCurrency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["dataSourceId"],"additionalProperties":false},{"type":"null"}]}},"sync":{"type":"object","properties":{"pushInvoices":{"default":true,"type":"boolean"},"createMissingRows":{"default":true,"type":"boolean"},"importInvoices":{"default":false,"type":"boolean"},"proposeFromNotion":{"default":true,"type":"boolean"},"autoLookupParties":{"default":true,"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"required":["id","config"],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.search":{"post":{"summary":"Search Notion databases (data sources) or pages that are shared with the integration, most recently edited first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_search","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","maxLength":200},"kind":{"default":"data_source","type":"string","enum":["data_source","page"]},"cursor":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}}},"get":{"summary":"Search Notion databases (data sources) or pages that are shared with the integration, most recently edited first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_search_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"kind","in":"query","required":false,"schema":{"default":"data_source","type":"string","enum":["data_source","page"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.dataSources.get":{"post":{"summary":"Read a Notion data source's properties and suggested mappings for each role (invoices, customers, vendors, contacts), including suggested status option mappings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_dataSources_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.dataSources.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":32,"maxLength":36}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read a Notion data source's properties and suggested mappings for each role (invoices, customers, vendors, contacts), including suggested status option mappings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_dataSources_get_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.dataSources.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","minLength":32,"maxLength":36}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.dataSources.query":{"post":{"summary":"Preview rows of a Notion data source with simplified property values, optionally filtered by a title search. Paged with cursor. Properties whose names say they hold payment or tax details (bank, account, transit, institution and routing numbers, IBAN, SWIFT/BIC, Wise or Interac addresses, SIN, SSN, business or tax numbers) read as [hidden], and what they hold is hidden anywhere else in the rows too.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_dataSources_query","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.dataSources.query"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":32,"maxLength":36},"search":{"type":"string","maxLength":100},"cursor":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Preview rows of a Notion data source with simplified property values, optionally filtered by a title search. Paged with cursor. Properties whose names say they hold payment or tax details (bank, account, transit, institution and routing numbers, IBAN, SWIFT/BIC, Wise or Interac addresses, SIN, SSN, business or tax numbers) read as [hidden], and what they hold is hidden anywhere else in the rows too.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_dataSources_query_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.dataSources.query"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","minLength":32,"maxLength":36}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.resolveLink":{"post":{"summary":"Resolve a pasted Notion link or ID (notion.so, app.notion.com, notion.site, collection://) to the page, database, or data source it refers to.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_resolveLink","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.resolveLink"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000}},"required":["url"],"additionalProperties":false}}}}},"get":{"summary":"Resolve a pasted Notion link or ID (notion.so, app.notion.com, notion.site, collection://) to the page, database, or data source it refers to.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_resolveLink_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.resolveLink"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.links.list":{"post":{"summary":"List links between Oatmilk records (accounts, invoices, contractors) and Notion pages, with their status (suggested, confirmed, declined), method, match reasons, and sync state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_links_list","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"localType":{"type":"string","enum":["party","invoice","contractor"]},"localId":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["proposed","confirmed","rejected"]},"role":{"type":"string","enum":["invoices","companies","vendors","contacts"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List links between Oatmilk records (accounts, invoices, contractors) and Notion pages, with their status (suggested, confirmed, declined), method, match reasons, and sync state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_links_list_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"localType","in":"query","required":false,"schema":{"type":"string","enum":["party","invoice","contractor"]}},{"name":"localId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","confirmed","rejected"]}},{"name":"role","in":"query","required":false,"schema":{"type":"string","enum":["invoices","companies","vendors","contacts"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.links.create":{"post":{"summary":"Link an Oatmilk account, invoice, or contractor to a Notion page by page ID or pasted link. Links created by a person are confirmed unless status is proposed. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_links_create","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"localType":{"type":"string","enum":["party","invoice","contractor"]},"localId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["invoices","companies","vendors","contacts"]},"pageId":{"type":"string","minLength":32,"maxLength":36},"url":{"type":"string","minLength":1,"maxLength":2000},"method":{"type":"string","enum":["manual","link","smart_lookup"]},"status":{"type":"string","enum":["confirmed","proposed"]},"candidate":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100},"confidence":{"type":"string","enum":["low","medium","high"]},"reasons":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}}},"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["localType","localId"],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.links.confirm":{"post":{"summary":"Confirm a suggested Notion link. Any other confirmed link for the same record and database is replaced. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_links_confirm","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.links.reject":{"post":{"summary":"Decline a suggested Notion link so it isn't suggested again. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_links_reject","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.reject"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.links.remove":{"post":{"summary":"Remove a Notion link. The Notion page itself is not changed. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_links_remove","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.links.remove"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.lookup":{"post":{"summary":"Find likely Notion pages for an Oatmilk account, invoice, or contractor in the mapped databases. Candidates are ranked by name, email, website domain, invoice number, amount, and dates, with the reasons for each match. Nothing is linked until a person confirms.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_lookup","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.lookup"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"localType":{"type":"string","enum":["party","invoice","contractor"]},"localId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["invoices","companies","vendors","contacts"]},"query":{"type":"string","maxLength":100}},"required":["localType","localId"],"additionalProperties":false}}}}},"get":{"summary":"Find likely Notion pages for an Oatmilk account, invoice, or contractor in the mapped databases. Candidates are ranked by name, email, website domain, invoice number, amount, and dates, with the reasons for each match. Nothing is linked until a person confirms.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_lookup_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.lookup"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"localType","in":"query","required":true,"schema":{"type":"string","enum":["party","invoice","contractor"]}},{"name":"localId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"role","in":"query","required":false,"schema":{"type":"string","enum":["invoices","companies","vendors","contacts"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.sync.run":{"post":{"summary":"Start a Notion sync now: read changed invoice rows and prepare suggestions for differences, then update Notion rows from Oatmilk invoices. Returns a runId to follow with runs.get. Supply direction (push, pull, both, full) and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_sync_run","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.sync.run"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"direction":{"default":"both","type":"string","enum":["push","pull","both","full"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/notion.invoices.importPreview":{"post":{"summary":"Preview existing rows in the mapped Notion invoice database with the Oatmilk invoice each one most likely matches, whether it's already linked, and whether the statuses differ.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_invoices_importPreview","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.invoices.importPreview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cursor":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"Preview existing rows in the mapped Notion invoice database with the Oatmilk invoice each one most likely matches, whether it's already linked, and whether the statuses differ.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notion_invoices_importPreview_get","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.invoices.importPreview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notion.invoices.import":{"post":{"summary":"Link existing Notion invoice rows to Oatmilk invoices. Status differences become suggestions for review; nothing is overwritten. Supply selections of pageId and invoiceId, plus idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notion_invoices_import","tags":["notion"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notion.invoices.import"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"selections":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"pageId":{"type":"string","minLength":32,"maxLength":36},"invoiceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["pageId","invoiceId"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["selections"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.endpoints.list":{"post":{"summary":"List outgoing webhook endpoints with their subscribed events, status, recent delivery counts, and the last four characters of each signing secret.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_endpoints_list","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List outgoing webhook endpoints with their subscribed events, status, recent delivery counts, and the last four characters of each signing secret.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_endpoints_list_get","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/webhooks.endpoints.create":{"post":{"summary":"Create an outgoing webhook endpoint with an https URL on the standard port (443) or 8443 and event subscriptions (exact names, group wildcards such as invoice.*, or *). Private and local network addresses are refused. The signing secret is returned once; replaying the same idempotencyKey returns the same response to the same person. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_endpoints_create","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.create"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","minLength":10,"maxLength":2000},"description":{"type":"string","maxLength":500},"events":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["url","events"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.endpoints.update":{"post":{"summary":"Change an endpoint's URL, description, events, or turn it on or off. Turning a disabled endpoint back on resets its failure count. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_endpoints_update","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"url":{"type":"string","minLength":10,"maxLength":2000},"description":{"type":"string","maxLength":500},"events":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"active":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.endpoints.rotateSecret":{"post":{"summary":"Replace an endpoint's signing secret. The new secret is returned once and signs every later delivery. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_endpoints_rotateSecret","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.rotateSecret"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.endpoints.archive":{"post":{"summary":"Remove an endpoint and cancel its queued deliveries. Delivery history is kept. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_endpoints_archive","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.endpoints.archive"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.events.catalog":{"post":{"summary":"List the event types Oatmilk can send to webhooks, grouped by area, with descriptions and sample payloads.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_events_catalog","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.events.catalog"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the event types Oatmilk can send to webhooks, grouped by area, with descriptions and sample payloads.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_events_catalog_get","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.events.catalog"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/webhooks.deliveries.list":{"post":{"summary":"List webhook deliveries with status, attempts, response code, duration, a redacted response excerpt, and the signed payload. Filter by endpoint, status, or event type.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_deliveries_list","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.deliveries.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","processing","delivered","failed","cancelled"]},"eventType":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$"},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List webhook deliveries with status, attempts, response code, duration, a redacted response excerpt, and the signed payload. Filter by endpoint, status, or event type.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_deliveries_list_get","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.deliveries.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"endpointId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","processing","delivered","failed","cancelled"]}},{"name":"eventType","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/webhooks.deliveries.stats":{"post":{"summary":"Summarize webhook deliveries of real events (not tests) for the last 1, 7 or 30 days: how many were delivered, failed or are still waiting, median and 95th percentile response times, deliveries per day, each endpoint's counts, the busiest event types and the most common failure reasons.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_deliveries_stats","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.deliveries.stats"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":7,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"Summarize webhook deliveries of real events (not tests) for the last 1, 7 or 30 days: how many were delivered, failed or are still waiting, median and 95th percentile response times, deliveries per day, each endpoint's counts, the busiest event types and the most common failure reasons.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"webhooks_deliveries_stats_get","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.deliveries.stats"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/webhooks.deliveries.retry":{"post":{"summary":"Queue a failed or cancelled delivery to be sent again with the same event payload. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_deliveries_retry","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.deliveries.retry"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/webhooks.test":{"post":{"summary":"Send a test event to an endpoint, either webhook.test or a sample of a catalog event, signed like real deliveries. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"webhooks_test","tags":["webhooks"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/webhooks.test"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"eventType":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*){1,3}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["endpointId"],"additionalProperties":false}}}}}},"/api/v1/accounting/proposals.list":{"post":{"summary":"List suggested changes to invoices, entries, mail, accounts, and Notion links, with the current and proposed values, plain-language reasoning, evidence, whether the evidence is newer or older, and status. Defaults to suggestions waiting for review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"proposals_list","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjectType":{"type":"string","enum":["invoice","entry","mail","party","notion_link","contractor","merchant"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"status":{"default":"pending","type":"string","enum":["pending","approved","rejected","superseded","applied","failed","all"]},"source":{"type":"string","enum":["ai","rule","connector","user","accountant"]},"field":{"type":"string","enum":["status","category","classification","payment","mapping","details","evidence","match","attribution"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List suggested changes to invoices, entries, mail, accounts, and Notion links, with the current and proposed values, plain-language reasoning, evidence, whether the evidence is newer or older, and status. Defaults to suggestions waiting for review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"proposals_list_get","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["invoice","entry","mail","party","notion_link","contractor","merchant"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"default":"pending","type":"string","enum":["pending","approved","rejected","superseded","applied","failed","all"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["ai","rule","connector","user","accountant"]}},{"name":"field","in":"query","required":false,"schema":{"type":"string","enum":["status","category","classification","payment","mapping","details","evidence","match","attribution"]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/proposals.get":{"post":{"summary":"Read one suggested change with its reasoning, evidence links, and decision history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"proposals_get","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one suggested change with its reasoning, evidence links, and decision history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"proposals_get_get","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/proposals.decide":{"post":{"summary":"Decline a suggested change, or approve it when a person is signed in to Oatmilk. API keys and agents can decline but can't approve; approving through them is refused with \"Approve suggestions in Oatmilk.\" Approving applies the change through the normal audited action for that record, such as recording an invoice payment or recategorizing an entry. A partly paid suggestion without an amount needs paidAmountMinor. A failed or stale approval can be approved again or declined. Requires expectedRevision and idempotencyKey; an optional note is kept with the decision.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"proposals_decide","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.decide"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":1000},"paidAmountMinor":{"type":"string","pattern":"^(?!0+$)\\d{1,18}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/proposals.create":{"post":{"summary":"Suggest a change to a record for someone to review. Nothing changes until the suggestion is approved. A newer suggestion for the same record and field replaces the older one. Supply subjectType, subjectId, field, proposedValue, reasoning, optional evidence, and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"proposals_create","tags":["proposals"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/proposals.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subjectType":{"type":"string","enum":["invoice","entry","mail","party","notion_link","contractor","merchant"]},"subjectId":{"type":"string","minLength":1,"maxLength":200},"field":{"type":"string","enum":["status","category","classification","payment","mapping","details"]},"proposedValue":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":60},"additionalProperties":{}},"currentValue":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":60},"additionalProperties":{}},"reasoning":{"type":"string","minLength":3,"maxLength":2000},"evidence":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"},"id":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","minLength":1,"maxLength":200},"date":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["type","id","label"],"additionalProperties":false}},"confidence":{"default":"medium","type":"string","enum":["low","medium","high"]},"freshness":{"default":"unknown","type":"string","enum":["newer","older","same","unknown"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["subjectType","subjectId","field","proposedValue","reasoning"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.directory.list":{"post":{"summary":"List every contractor with their roles, department, status, rate and pay cadence, payment profile completeness (masked), agreement on file, pending hours, next hours due date, last activity, their recent pay periods and live payouts with whether payouts are prepared for them automatically (pay, the same as contractorOps.profiles.get returns, for when they are paid next), and for anyone who has not joined the portal where their invitation stands (invite: state and label, such as not_invited, sent, delivered, bounced or expired; null once they have joined). Filter by query, status, department, or role.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_directory_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.directory.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"query":{"type":"string","maxLength":200},"status":{"type":"string","enum":["onboarding","active","inactive"]},"department":{"type":"string","maxLength":120},"role":{"type":"string","maxLength":80}},"additionalProperties":false}}}}},"get":{"summary":"List every contractor with their roles, department, status, rate and pay cadence, payment profile completeness (masked), agreement on file, pending hours, next hours due date, last activity, their recent pay periods and live payouts with whether payouts are prepared for them automatically (pay, the same as contractorOps.profiles.get returns, for when they are paid next), and for anyone who has not joined the portal where their invitation stands (invite: state and label, such as not_invited, sent, delivered, bounced or expired; null once they have joined). Filter by query, status, department, or role.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_directory_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.directory.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["onboarding","active","inactive"]}},{"name":"department","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"role","in":"query","required":false,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.profiles.get":{"post":{"summary":"Read one contractor's operations profile: roles, department, dates, contact details, address, rate, pay cadence, sales tax and corporation details, hours form, completeness, and a masked payment profile. Also returns their recent pay periods and payouts, and whether Oatmilk prepares their payouts automatically, so a caller can say when they are paid next. Full bank numbers are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_profiles_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.profiles.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"Read one contractor's operations profile: roles, department, dates, contact details, address, rate, pay cadence, sales tax and corporation details, hours form, completeness, and a masked payment profile. Also returns their recent pay periods and payouts, and whether Oatmilk prepares their payouts automatically, so a caller can say when they are paid next. Full bank numbers are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_profiles_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.profiles.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.profiles.update":{"post":{"summary":"Create or update a contractor's operations profile with contractorId, profile fields, expectedRevision (omit only when no profile exists yet), and idempotencyKey. Changing the pay cadence regenerates future empty pay periods. Changing the declared GST/HST answers stops finance's confirmation from applying and removes the GST/HST it added from payouts that haven't been paid and have no Wise transfer (approved ones go back for approval).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_profiles_update","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.profiles.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"profile":{"type":"object","properties":{"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"roles":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"phone":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[0-9+().\\s-]*$"},{"type":"null"}]},"discordUsername":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"githubUsername":{"anyOf":[{"type":"string","maxLength":39,"pattern":"^([A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38})?$"},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(https?:\\/\\/\\S+)?$"},{"type":"null"}]},"customContacts":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","minLength":1,"maxLength":500}},"required":["label","value"],"additionalProperties":false}},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","pattern":"^([A-Za-z]{2})?$"}},"additionalProperties":false},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"tax":{"type":"object","properties":{"chargesSalesTax":{"default":false,"type":"boolean"},"salesTaxRateBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"salesTaxNumber":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"province":{"anyOf":[{"type":"string","enum":["AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},{"type":"null"}]},"operatesAsCorporation":{"default":false,"type":"boolean"},"corporationName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"businessNumber":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"corporationAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","pattern":"^([A-Za-z]{2})?$"}},"additionalProperties":false},{"type":"null"}]},"signerName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"signerTitle":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"usTaxForm":{"anyOf":[{"type":"string","enum":["w9","w8ben","w8bene","unsure"]},{"type":"null"}]},"usTaxClassification":{"anyOf":[{"type":"string","enum":["individual","c_corporation","s_corporation","partnership","trust_estate","llc_c","llc_s","llc_p","other"]},{"type":"null"}]}},"additionalProperties":false},"department":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"status":{"type":"string","enum":["onboarding","active","inactive"]},"rate":{"anyOf":[{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^\\d{1,15}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","month","fixed"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},{"type":"null"}]},"cadence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"weekStartsOn":{"default":1,"type":"integer","minimum":0,"maximum":6},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"biweekly"},"anchorDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind","anchorDate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"semi_monthly"},"days":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":27},{"type":"integer","minimum":2,"maximum":28}]},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monthly"},"day":{"default":1,"type":"integer","minimum":1,"maximum":28},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"}},"required":["kind"],"additionalProperties":false}]},"hoursFormId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"additionalProperties":false}},"required":["contractorId","profile"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.salesTax.confirm":{"post":{"summary":"Confirm or correct the GST/HST a contractor declared, with contractorId, expectedRevision (the profile revision reviewed), chargesSalesTax, salesTaxRateBps (1 to 10000 when charged), a note, and idempotencyKey. Payouts add sales tax only at a confirmed rate, and a confirmation stops applying when the declared answers change. Payouts that aren't paid and have no Wise transfer are updated to the confirmed rate; approved ones go back for approval.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_salesTax_confirm","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.salesTax.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"chargesSalesTax":{"type":"boolean"},"salesTaxRateBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"note":{"type":"string","minLength":3,"maxLength":500}},"required":["contractorId","expectedRevision","chargesSalesTax","note"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payments.update":{"post":{"summary":"Administrators set a contractor's payment method (Wise email, bank transfer, Interac, or other), currency, and payment details. Omitted detail fields keep their saved values; null clears them. Responses are masked, the audit log records only which fields changed, the saved Wise recipient is reset, and approved payouts must be approved again. When the saved details can't be read (the profile's paymentDetailsState isn't readable), nothing changes unless the details sent are a complete set for the method; with an encryption key that isn't set any more, that also needs replaceUnreadable: true.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payments_update","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payments.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"method":{"type":"string","enum":["wise_email","bank_transfer","interac","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"details":{"type":"object","properties":{"wiseEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"wiseLink":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(https:\\/\\/\\S+)?$"},{"type":"null"}]},"accountHolderName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankAddress":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^([A-Za-z0-9][A-Za-z0-9 -]{2,38}[A-Za-z0-9])?$"},{"type":"null"}]},"swiftBic":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"iban":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"institutionNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{3})?$"},{"type":"null"}]},"transitNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{5})?$"},{"type":"null"}]},"routingNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{9})?$"},{"type":"null"}]},"accountType":{"anyOf":[{"type":"string","enum":["checking","savings"]},{"type":"null"}]},"country":{"anyOf":[{"type":"string","pattern":"^([A-Za-z]{2})?$"},{"type":"null"}]},"interacEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"otherInstructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"replaceUnreadable":{"type":"boolean"}},"required":["contractorId","method","currency","details"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payments.reveal":{"post":{"summary":"Show a contractor's full payment details to an administrator in the dashboard with an audited reason. Not available to API keys or MCP clients.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payments_reveal","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payments.reveal"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":5,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payments.verify":{"post":{"summary":"Record that an administrator confirmed a contractor's current payment details out of band, using the payment profile revision they reviewed and a note.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payments_verify","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payments.verify"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"note":{"type":"string","minLength":3,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","expectedRevision","note"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.forms.list":{"post":{"summary":"List the custom hours forms contractors fill in for each time entry, including which one is the default.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_forms_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.forms.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List the custom hours forms contractors fill in for each time entry, including which one is the default.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_forms_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.forms.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.forms.save":{"post":{"summary":"Create or update a custom hours form with name, ordered fields (key, label, type text/textarea/number/select/multiselect/date/checkbox/url, required, options, help), optional isDefault or archived, expectedRevision for updates, and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_forms_save","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.forms.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":1000},"fields":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","enum":["text","textarea","number","select","multiselect","date","checkbox","url"]},"required":{"default":false,"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"help":{"type":"string","maxLength":300}},"required":["key","label","type"],"additionalProperties":false}},"isDefault":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["name","fields"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.periods.list":{"post":{"summary":"List contractor pay periods with period dates, hours due date, pay date, status (open, submitted, approved, paid, skipped), and submitted and approved minutes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_periods_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.periods.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","submitted","approved","paid","skipped"]},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"List contractor pay periods with period dates, hours due date, pay date, status (open, submitted, approved, paid, skipped), and submitted and approved minutes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_periods_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.periods.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","submitted","approved","paid","skipped"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.periods.update":{"post":{"summary":"Mark a pay period as skipped (no hours expected) or reopen it, with expectedRevision, an optional note, and idempotencyKey. Skipped periods receive no reminders and don't accept hours. A period with submitted or approved hours or a payout can't be skipped.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_periods_update","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.periods.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"status":{"type":"string","enum":["open","skipped"]},"note":{"type":"string","maxLength":1000}},"required":["id","expectedRevision","status"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.timesheets.list":{"post":{"summary":"List timesheets awaiting approval, approved, or open by pay period. Hours submitted for dates no pay period covers (a manual cadence, or before the first period) are listed per contractor under unscheduled. With periodId, returns every time entry with its custom form values, missing required fields, and an estimated payout; with contractorId and unscheduled=true, returns that contractor's hours outside a pay period to review and the approved ones ready to pay (prepare them with contractorOps.payouts.prepare and hoursIds). Each listed period carries its live payout, if any, and pipeline says whether payouts are prepared automatically and whether contractors get reminder emails.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_timesheets_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.timesheets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"unscheduled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"status":{"default":"awaiting","type":"string","enum":["awaiting","approved","open","all"]}},"additionalProperties":false}}}}},"get":{"summary":"List timesheets awaiting approval, approved, or open by pay period. Hours submitted for dates no pay period covers (a manual cadence, or before the first period) are listed per contractor under unscheduled. With periodId, returns every time entry with its custom form values, missing required fields, and an estimated payout; with contractorId and unscheduled=true, returns that contractor's hours outside a pay period to review and the approved ones ready to pay (prepare them with contractorOps.payouts.prepare and hoursIds). Each listed period carries its live payout, if any, and pipeline says whether payouts are prepared automatically and whether contractors get reminder emails.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_timesheets_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.timesheets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"periodId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"unscheduled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"status","in":"query","required":false,"schema":{"default":"awaiting","type":"string","enum":["awaiting","approved","open","all"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.timesheets.review":{"post":{"summary":"Approve or return submitted time entries in a single atomic review, for one pay period (periodId) or for one contractor's hours outside a pay period (contractorId). Supply decisions with hoursId, expectedRevision and decision, a review reason, and idempotencyKey. A decision on a mistake the contractor reported in approved hours also carries the correctionId and decides approved or declined; approving it applies the corrected values, and declining leaves the entry as approved. Approval never sends money.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_timesheets_review","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.timesheets.review"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":1000},"decisions":{"minItems":1,"maxItems":200,"type":"array","items":{"anyOf":[{"type":"object","properties":{"hoursId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decision":{"type":"string","enum":["approved","rejected"]}},"required":["hoursId","expectedRevision","decision"],"additionalProperties":false},{"type":"object","properties":{"hoursId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"correctionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["approved","declined"]}},"required":["hoursId","expectedRevision","correctionId","decision"],"additionalProperties":false}]}}},"required":["reason","decisions"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.hours.history":{"post":{"summary":"Read one time entry's history (hoursId): every change from logging to approval and any correction, oldest first, with the entry's dates, who acted (contractor, a finance member by email, or the platform), the old and new values, the reason given, whether it's on hold for an open correction, and where it stands in a payout (unpaid, scheduled or paid).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_hours_history","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.hours.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hoursId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["hoursId"],"additionalProperties":false}}}}},"get":{"summary":"Read one time entry's history (hoursId): every change from logging to approval and any correction, oldest first, with the entry's dates, who acted (contractor, a finance member by email, or the platform), the old and new values, the reason given, whether it's on hold for an open correction, and where it stands in a payout (unpaid, scheduled or paid).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_hours_history_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.hours.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"hoursId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.payouts.list":{"post":{"summary":"List contractor payouts with amounts, tax, status, approvals, Wise transfer progress, and errors. Filter by contractor, period, or status.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_payouts_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["draft","pending_approval","approved","processing","sent","failed","cancelled","paid_manually","attention"]}},"additionalProperties":false}}}}},"get":{"summary":"List contractor payouts with amounts, tax, status, approvals, Wise transfer progress, and errors. Filter by contractor, period, or status.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_payouts_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"periodId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending_approval","approved","processing","sent","failed","cancelled","paid_manually","attention"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.payouts.get":{"post":{"summary":"Read one contractor payout with its time entries, calculation, approval, Wise quote, recipient and transfer identifiers, and the related activity run.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_payouts_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one contractor payout with its time entries, calculation, approval, Wise quote, recipient and transfer identifiers, and the related activity run.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_payouts_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.payouts.prepare":{"post":{"summary":"Prepare a payout from approved hours for a pay period (periodId), or a milestone payout for a contractor (contractorId with hoursIds or amountMinor). Amounts use exact minor units: approved minutes × hourly rate, days × day rate, or fixed and monthly rules, plus GST/HST only at a rate finance confirmed (salesTaxStatus shows when the contractor's declared tax isn't confirmed yet). Hours can never be included in two active payouts.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payouts_prepare","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hoursIds":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"amountMinor":{"type":"string","pattern":"^\\d{1,15}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"description":{"type":"string","maxLength":500},"includeEarlierUnpaid":{"default":true,"type":"boolean"},"applyTax":{"default":true,"type":"boolean"},"submitForApproval":{"default":true,"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payouts.approve":{"post":{"summary":"Approve a prepared payout with expectedRevision and idempotencyKey. Approval records the contractor's current payment details revision; if those details change later, the payout must be approved again before sending.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payouts_approve","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.approve"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"note":{"type":"string","maxLength":500}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payouts.send":{"post":{"summary":"Send an approved payout through Wise (quote, recipient, transfer, fund from balance). Requires an administrator in the dashboard, the confirmed total and currency, expectedRevision, and idempotencyKey. Refused while an hour in the payout has a correction waiting, and while an hour is still inside the wait after approval unless overrideReason says why (audited). Retries never create a second transfer. Not available to API keys or MCP clients.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payouts_send","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.send"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"confirmTotalMinor":{"type":"string","pattern":"^\\d{1,15}$"},"confirmCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"overrideReason":{"type":"string","minLength":3,"maxLength":500}},"required":["id","expectedRevision","confirmTotalMinor","confirmCurrency"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payouts.markPaid":{"post":{"summary":"Record a payout as paid outside Wise with a payment reference, the payment date, expectedRevision, and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payouts_markPaid","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.markPaid"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reference":{"type":"string","minLength":3,"maxLength":200},"paidOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"note":{"type":"string","maxLength":500}},"required":["id","expectedRevision","reference","paidOn"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.payouts.cancel":{"post":{"summary":"Cancel a payout that has not been funded, releasing its time entries for a future payout. An unfunded Wise transfer is cancelled first. Requires a reason, expectedRevision, and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_payouts_cancel","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.payouts.cancel"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.wise.status":{"post":{"summary":"Read whether Wise payouts are enabled in this environment: sandbox or production, write token and signing key presence (never their values), business profile, and optionally available balances (amountMinor in minor units).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_wise_status","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.wise.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeBalances":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"Read whether Wise payouts are enabled in this environment: sandbox or production, write token and signing key presence (never their values), business profile, and optionally available balances (amountMinor in minor units).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_wise_status_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.wise.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeBalances","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.encryption.status":{"post":{"summary":"Read how contractor tax numbers and payment details are encrypted here: whether the encryption key and the previous key are set and usable (never their values), how many values the scheduled run still has to encrypt or re-encrypt, how many can't be read with the keys set now, recorded failures by error code, when a value was last tried, whether the previous key is safe to remove (only once nothing in any organization uses it), whether the organization's fingerprint key can be read (fingerprintKey) and can be reset (canResetFingerprintKey), and warnings. Counts only.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_encryption_status","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.encryption.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read how contractor tax numbers and payment details are encrypted here: whether the encryption key and the previous key are set and usable (never their values), how many values the scheduled run still has to encrypt or re-encrypt, how many can't be read with the keys set now, recorded failures by error code, when a value was last tried, whether the previous key is safe to remove (only once nothing in any organization uses it), whether the organization's fingerprint key can be read (fingerprintKey) and can be reset (canResetFingerprintKey), and warnings. Counts only.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_encryption_status_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.encryption.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.encryption.resetFingerprintKey":{"post":{"summary":"Only while the organization's fingerprint key can't be read any more (the encryption key it was sealed with is lost), replace it with a new one, with a reason, so tax numbers and payment details can be saved and paid out again. Fingerprints are worked out again for every tax number and payment email that can still be read; ones that can't be read lose theirs and are flagged until they're entered again, and saved Wise recipients are created again on their next payout. Refused while the fingerprint key can still be read. Audited with counts and the reason only. Only an administrator in the dashboard can; not available to API keys or MCP clients.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_encryption_resetFingerprintKey","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.encryption.resetFingerprintKey"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":5,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.activity.list":{"post":{"summary":"Read a human-readable activity log for one contractor or all contractors: profile and payment changes, hours, reviews, agreements, reminders sent, and payouts, newest first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_activity_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.activity.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"before":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}}},"get":{"summary":"Read a human-readable activity log for one contractor or all contractors: profile and payment changes, hours, reviews, agreements, reminders sent, and payouts, newest first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_activity_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.activity.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.reminders.run":{"post":{"summary":"Run contractor operations now: create pay periods, send due, late, profile, and approval reminders that are due, and prepare payouts for approved periods. Safe to repeat; reminders are never sent twice.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_reminders_run","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.reminders.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.agreements.list":{"post":{"summary":"List contractor agreements from the versions of each contractor's terms, for a view: all, active (in effect), ending (in effect with an end date within 45 days), expired (the one in effect has passed its end date) or waiting (an update waiting for a signature or a check), with counts for every view. Each has the contractor, role, rate, start and end dates, days left, state (active, ending, expired, upcoming, replaced or waiting), finance's end decision for an expired one (continuing, ending, or null when undecided), when a renewal starts, whether new terms are waiting (renewalPending), for an undecided expired one whether they kept working and what happened since (the same as contractorOps.agreements.ended), and href, the contractor's Agreement tab. Each version also says where its signed copy is (copy: a document in Oatmilk, or a link when it was signed elsewhere). Without contractorId it covers the organization, lists active contractors with no agreement recorded, and lists signed agreements imported with the dates not stated (undated), which aren't in the views by date. With contractorId it covers that contractor and adds their documents on file from contractor agreements, signing envelopes and imports (items, each an agreement or an nda, with signedElsewhere for a copy kept at its link and datesNotStated for an undated one), whether an agreement is on file (status on_file, signed_elsewhere, terms_on_file, requested, draft or agreement_missing), and whether a signed NDA is.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"view":{"default":"all","type":"string","enum":["all","active","ending","expired","waiting"]}},"additionalProperties":false}}}}},"get":{"summary":"List contractor agreements from the versions of each contractor's terms, for a view: all, active (in effect), ending (in effect with an end date within 45 days), expired (the one in effect has passed its end date) or waiting (an update waiting for a signature or a check), with counts for every view. Each has the contractor, role, rate, start and end dates, days left, state (active, ending, expired, upcoming, replaced or waiting), finance's end decision for an expired one (continuing, ending, or null when undecided), when a renewal starts, whether new terms are waiting (renewalPending), for an undecided expired one whether they kept working and what happened since (the same as contractorOps.agreements.ended), and href, the contractor's Agreement tab. Each version also says where its signed copy is (copy: a document in Oatmilk, or a link when it was signed elsewhere). Without contractorId it covers the organization, lists active contractors with no agreement recorded, and lists signed agreements imported with the dates not stated (undated), which aren't in the views by date. With contractorId it covers that contractor and adds their documents on file from contractor agreements, signing envelopes and imports (items, each an agreement or an nda, with signedElsewhere for a copy kept at its link and datesNotStated for an undated one), whether an agreement is on file (status on_file, signed_elsewhere, terms_on_file, requested, draft or agreement_missing), and whether a signed NDA is.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"view","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","active","ending","expired","waiting"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.agreements.importExecuted":{"post":{"summary":"Mark an already-signed agreement as this contractor's executed agreement using a fileId from the signing upload flow, a title, the execution date, and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_agreements_importExecuted","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.importExecuted"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileId":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"executedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","fileId","title","executedOn"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.agreements.contractorDraft":{"post":{"summary":"Prefill for filing a signed agreement or NDA that has no contractor (envelopeId, or intakeItemId of the filed upload): the other party's name, email addresses, role and the job role and level it matches, rate, start and end dates and where they live, as the document states them with the words each came from, plus existing contractors it may be (any address Oatmilk knows for them, then the same name, then a close name) with which of the document's addresses each uses and whether the document is newer than their terms. Pass the name and email being added (name, email) to look those up too. Nothing is saved.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_contractorDraft","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.contractorDraft"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"intakeItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","maxLength":300},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"additionalProperties":false}}}}},"get":{"summary":"Prefill for filing a signed agreement or NDA that has no contractor (envelopeId, or intakeItemId of the filed upload): the other party's name, email addresses, role and the job role and level it matches, rate, start and end dates and where they live, as the document states them with the words each came from, plus existing contractors it may be (any address Oatmilk knows for them, then the same name, then a close name) with which of the document's addresses each uses and whether the document is newer than their terms. Pass the name and email being added (name, email) to look those up too. Nothing is saved.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_contractorDraft_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.contractorDraft"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"envelopeId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"intakeItemId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","maxLength":300}},{"name":"email","in":"query","required":false,"schema":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.agreements.addContractor":{"post":{"summary":"Add the other party of a signed agreement or NDA that has no contractor as a new contractor and file the document with them: envelopeId, contractor (displayName, legalName, email, optional otherEmails, country, region, jobRoleId, title, rate, startDate, endDate) and idempotencyKey. Refused when an address already belongs to a contractor (use contractorOps.agreements.linkContractor), or when someone has the same or a close name unless notDuplicateOf lists them. An agreement's role, rate and dates become its terms when its title has a matching jobRoleId; otherwise the terms wait for review and role selection. With no terms given, the document is read for its terms to check. An NDA stays apart from the agreement. No invitation is sent. A document is never filed twice, whoever asks.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_agreements_addContractor","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.addContractor"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractor":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"type":"string","minLength":1,"maxLength":300},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"otherEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}]},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"jobRoleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"rate":{"anyOf":[{"type":"object","properties":{"amountMinor":{"type":"string","pattern":"^\\d{1,15}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"unit":{"type":"string","enum":["hour","day","month"]}},"required":["amountMinor","currency","unit"],"additionalProperties":false},{"type":"null"}]},"startDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["displayName","legalName","email"],"additionalProperties":false},"notDuplicateOf":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["envelopeId","contractor"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.agreements.linkContractor":{"post":{"summary":"File a signed agreement or NDA that has no contractor with an existing contractor (envelopeId, contractorId, idempotencyKey). An agreement newer than their terms is read for its terms to check and replaces them once confirmed (a draft read from an older agreement is replaced; while an update is out for signature it waits); an older or undated one is kept as history and never changes newer terms. An NDA stays apart from the agreement.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_agreements_linkContractor","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.linkContractor"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["envelopeId","contractorId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.agreements.keepAsHistory":{"post":{"summary":"Keep an agreement filed with a contractor as history instead of reading its terms (contractorId, envelopeId, idempotencyKey), such as one that couldn't be read, isn't a contractor agreement, or whose terms were entered by hand. Its terms are never read or applied, and it leaves the checklist. Refused while its terms are being read.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_agreements_keepAsHistory","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.keepAsHistory"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","envelopeId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.agreements.unlinked":{"post":{"summary":"List signed agreements and NDAs that aren't filed with any contractor or other record, newest first, with the other party as recorded and a link to each.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_unlinked","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.unlinked"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"List signed agreements and NDAs that aren't filed with any contractor or other record, newest first, with the other party as recorded and a link to each.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_unlinked_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.unlinked"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.agreements.ended":{"post":{"summary":"List agreements that have ended for active contractors with no decision yet (not renewed, no renewal waiting for signatures, and no end decision recorded): the end date, what happened since (minutes logged, timesheet entries, pay periods, payouts and payments after the end date), a one-line summary, and the renewal to offer (the same terms from the day after it ended). An ended agreement blocks nothing. Contractors who kept working come first. Filter by contractorId. Renew with contractorOps.terms.propose, or record a decision with contractorOps.terms.endDecision (continuing keeps them working without renewing, ending lets it end); either decision removes it from this list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_ended","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.ended"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"List agreements that have ended for active contractors with no decision yet (not renewed, no renewal waiting for signatures, and no end decision recorded): the end date, what happened since (minutes logged, timesheet entries, pay periods, payouts and payments after the end date), a one-line summary, and the renewal to offer (the same terms from the day after it ended). An ended agreement blocks nothing. Contractors who kept working come first. Filter by contractorId. Renew with contractorOps.terms.propose, or record a decision with contractorOps.terms.endDecision (continuing keeps them working without renewing, ending lets it end); either decision removes it from this list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_agreements_ended_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.ended"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.agreements.sendTemplate":{"post":{"summary":"Create a contractor agreement envelope from the contractor agreement template, prefilled from the profile (legal name, address, role, rate, cadence, term), optionally with a company signer who is an administrator or finance member (found by email), and send it for signature. values overrides template fields by their keys, like contractor.estimatedEngagement. Prefer contractorOps.terms.propose, which also records the terms Oatmilk enforces.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_agreements_sendTemplate","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.agreements.sendTemplate"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","maxLength":2000},"send":{"default":true,"type":"boolean"},"companySigner":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"type":"string","maxLength":160}},"required":["name","email"],"additionalProperties":false},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,40}(\\.[a-z][a-zA-Z0-9_]{0,40}){0,2}$"},"additionalProperties":{"type":"string","maxLength":4000}}},"required":["contractorId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.get":{"post":{"summary":"Read a contractor's agreement terms: the version in effect today (role, rate, pay schedule, hour limits per day, week, month or in total, dates, notice, where the work is done, notable clauses), versions starting later, an update waiting for signature or confirmation, the full history with what each version changed, how many of today's, this week's, month's and the agreement's hours are used, the agreement that ended with no decision yet and what happened since (ended), what happened to each filed agreement's terms (reads: reading, read, queued behind an update out for signature, kept as history, or failed, with the reason), and the renewal to suggest (renewal: the same terms for another stretch, from the day after the end, or from the day after it ended when they kept working, with effectiveFrom, the new dates in terms, its length, endsIn days, and due when it ends within 45 days or already has; null with no end date, when later terms are set, or while an update is waiting). Send it with contractorOps.terms.propose, changing anything first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_terms_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"Read a contractor's agreement terms: the version in effect today (role, rate, pay schedule, hour limits per day, week, month or in total, dates, notice, where the work is done, notable clauses), versions starting later, an update waiting for signature or confirmation, the full history with what each version changed, how many of today's, this week's, month's and the agreement's hours are used, the agreement that ended with no decision yet and what happened since (ended), what happened to each filed agreement's terms (reads: reading, read, queued behind an update out for signature, kept as history, or failed, with the reason), and the renewal to suggest (renewal: the same terms for another stretch, from the day after the end, or from the day after it ended when they kept working, with effectiveFrom, the new dates in terms, its length, endsIn days, and due when it ends within 45 days or already has; null with no end date, when later terms are set, or while an update is waiting). Send it with contractorOps.terms.propose, changing anything first.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_terms_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.titleChange.plan":{"post":{"summary":"Plan a contractor title change from the current agreement. Returns the current title, organization-local today, pending or later agreement, and every signer carried forward with whether an inactive member needs replacement; no document is sent or saved.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_titleChange_plan","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.titleChange.plan"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"Plan a contractor title change from the current agreement. Returns the current title, organization-local today, pending or later agreement, and every signer carried forward with whether an inactive member needs replacement; no document is sent or saved.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_titleChange_plan_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.titleChange.plan"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.titleChange.propose":{"post":{"summary":"Create a title-change amendment tied to an active organization job role with a different title, copying every other current agreement term and all required signer roles. The contractor uses their current email; company signers must be active finance or admin members. Optional companySigner and signerReplacements select current recipients before send. The title stays pending until every signer signs and its effective date arrives. Requires contractorId, roleId, effectiveFrom, send and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_titleChange_propose","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.titleChange.propose"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"effectiveFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"send":{"default":true,"type":"boolean"},"companySigner":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]}},"required":["name","email"],"additionalProperties":false},"signerReplacements":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["recipientId","name","email"],"additionalProperties":false}},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","roleId","effectiveFrom"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.titleChange.override":{"post":{"summary":"Administrator override of a contractor title change with a reason, job role, date and idempotency key. A pending title amendment is voided before the override is recorded; its audit and document history remain.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_titleChange_override","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.titleChange.override"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"effectiveFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","roleId","effectiveFrom","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.set":{"post":{"summary":"Set a contractor's agreement terms without a signature (for example a daily or weekly hour limit, or terms of an agreement signed elsewhere), with contractorId, terms, effectiveFrom, optional jobRoleId and idempotencyKey. A titled agreement must link to an active matching job role; a unique match is resolved when jobRoleId is omitted. They take effect from effectiveFrom: hour limits apply to every timesheet entry from then on, and role, rate, pay schedule and dates update the profile. A blank rate keeps the rate already agreed (the previous version's, or the profile's). Pass basisTermsId (the version in effect when you read it, or null for none) to be refused when someone else changed the agreement since. A first version can't start after hours that are waiting to be paid.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_set","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.set"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"terms":{},"effectiveFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"jobRoleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note":{"type":"string","maxLength":2000},"basisTermsId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","terms","effectiveFrom"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.linkRole":{"post":{"summary":"Link the current agreement's existing title to a matching active contractor job role, without changing the title or agreement terms. Requires terms id, roleId, expectedRevision and idempotencyKey. Only available when the current agreement has no role link; the change is audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_linkRole","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.linkRole"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","roleId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.propose":{"post":{"summary":"Send new agreement terms for signature, with contractorId, terms, effectiveFrom, optional jobRoleId, send, an optional company signer (an administrator or finance member who signs in Oatmilk) and idempotencyKey. A titled first agreement must link to a matching active job role; a unique match is resolved when jobRoleId is omitted. With no agreement in effect it sends the full contractor agreement; otherwise a one-page amendment listing changes to pay, hours or other terms. Use contractorOps.titleChange.propose to change a current title. The terms take effect once everyone has signed. Only one update can wait at a time. A blank rate keeps the rate already agreed, and basisTermsId (the version in effect when you read it, or null for none) refuses the change when someone else changed the agreement since.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_propose","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.propose"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"terms":{},"effectiveFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"jobRoleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note":{"type":"string","maxLength":2000},"basisTermsId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"send":{"default":true,"type":"boolean"},"companySigner":{"anyOf":[{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]}},"required":["userId","name","email"],"additionalProperties":false},{"type":"null"}]},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","terms","effectiveFrom"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.list":{"post":{"summary":"List the company's job roles (job descriptions for contractors and employees): title, level, department, type, summary, responsibilities, requirements, pay band (currency, lowest and highest amount in minor units, paid per hour, day, week, month or year), and the active contractors who have each role. A job is every role with the same title, and its levels form a ladder in levelOrder (1 is the first rung; null until someone reorders them). Archived roles are left out unless includeArchived is true.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List the company's job roles (job descriptions for contractors and employees): title, level, department, type, summary, responsibilities, requirements, pay band (currency, lowest and highest amount in minor units, paid per hour, day, week, month or year), and the active contractors who have each role. A job is every role with the same title, and its levels form a ladder in levelOrder (1 is the first rung; null until someone reorders them). Archived roles are left out unless includeArchived is true.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.roles.get":{"post":{"summary":"Read one job role with its full description, pay band and current version.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one job role with its full description, pay band and current version.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.roles.versions":{"post":{"summary":"List a job role's versions, newest first, with roleId: what the role said and paid at each version (title, level, department, type, summary, responsibilities, requirements and pay band), which parts changed from the version before (title, level, department, type, description or pay), who changed it and when, and how many sent agreements were made on that version. Every change to those parts is a new version, and an agreement keeps the version and pay it was made with.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_versions","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.versions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["roleId"],"additionalProperties":false}}}}},"get":{"summary":"List a job role's versions, newest first, with roleId: what the role said and paid at each version (title, level, department, type, summary, responsibilities, requirements and pay band), which parts changed from the version before (title, level, department, type, description or pay), who changed it and when, and how many sent agreements were made on that version. Every change to those parts is a new version, and an agreement keeps the version and pay it was made with.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_roles_versions_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.versions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"roleId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.roles.save":{"post":{"summary":"Create a job role, or update one with id and expectedRevision: title, level, department, employmentType (contractor, employee or either), summary, responsibilities, requirements, an optional pay band (payCurrency, payMinMinor, payMaxMinor, payUnit) and an optional levelOrder (its place on the job's ladder). Title and level together are unique.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_save","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"role":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"level":{"default":"","type":"string","maxLength":80},"department":{"default":"","type":"string","maxLength":120},"employmentType":{"default":"contractor","type":"string","enum":["contractor","employee","either"]},"summary":{"default":"","type":"string","maxLength":2000},"responsibilities":{"default":"","type":"string","maxLength":20000},"requirements":{"default":"","type":"string","maxLength":20000},"payCurrency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"payMinMinor":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,13}$"},{"type":"null"}]},"payMaxMinor":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,13}$"},{"type":"null"}]},"payUnit":{"default":null,"anyOf":[{"type":"string","enum":["hour","day","week","month","year"]},{"type":"null"}]},"levelOrder":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["title"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["role"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.archive":{"post":{"summary":"Archive a job role so it isn't offered for new contractors, or restore it (archived false), with expectedRevision and idempotencyKey. Contractors keep a role that was archived.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_archive","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.archive"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","archived"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.updateJob":{"post":{"summary":"Rename a job, and optionally set its department and type, on every level at once. levels lists each level's id and expectedRevision (include archived levels so the whole job changes together), with title and idempotencyKey. It changes nothing if any level changed since it was read, or if the new title and a level's name are already a role. A level held through an agreement can't be renamed here.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_updateJob","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.updateJob"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"levels":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"title":{"type":"string","minLength":1,"maxLength":200},"department":{"type":"string","maxLength":120},"employmentType":{"type":"string","enum":["contractor","employee","either"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["levels","title"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.archiveJob":{"post":{"summary":"Archive, or restore (archived false), several levels of a job at once: levels with each id and expectedRevision, archived and idempotencyKey. Contractors keep a role that was archived.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_archiveJob","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.archiveJob"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"levels":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["levels","archived"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.duplicateJob":{"post":{"summary":"Copy a job under a new title: levels lists the ids to copy, title is the new job's name, with idempotencyKey. Each copy keeps the level, department, type, description, pay band and ladder order, and has nobody in it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_duplicateJob","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.duplicateJob"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"levels":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}},"title":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["levels","title"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.reorder":{"post":{"summary":"Put a job's levels in order, first rung first: levels lists each level's id and expectedRevision in the order wanted, with idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_reorder","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.reorder"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"levels":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["levels"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.assign":{"post":{"summary":"Give a contractor a job role, or remove it with roleId null.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_assign","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.assign"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"roleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","roleId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.roles.import":{"post":{"summary":"Create or update job roles from a table: source notion with databaseId (the database's link or ID), or source csv with rows (column name to value). mapping names the column for any fields whose column names don't match (null for none); the others are matched by name, and a column that isn't in the table is reported in problems. A required field no column matches is refused with the table's columns listed. Fields: title (required), level, department, employmentType, summary, responsibilities, requirements, and either payBand text (\"CAD 60–80/hour\", \"$90k–110k per year\") or payMin, payMax, payCurrency, payUnit. Roles are matched by title and level, so importing again updates instead of duplicating, and a blank cell never erases what's written. A column whose name says it holds payment or tax details is never read, and problems says so when mapping names one. With preview true nothing is saved and the parsed roles and problems come back.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_roles_import","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.roles.import"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["csv","notion"],"description":"notion reads a Notion database on the server; csv takes the rows of a parsed CSV file."},"rows":{"description":"For csv: each row as column name to value, at most 500.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"type":"string","maxLength":20000}}},"databaseId":{"description":"For notion: the database's link or ID. The database must be shared with the Oatmilk connection.","type":"string","minLength":1,"maxLength":2000},"mapping":{"description":"The column for any fields whose column names don't match (null for none). Fields left out, or every field when it's omitted, are matched by column name; the result returns the mapping it used, so a preview shows the suggested one.","type":"object","properties":{"title":{"description":"The column holding Title (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"level":{"description":"The column holding Level, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"department":{"description":"The column holding Department, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"employmentType":{"description":"The column holding Type, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"summary":{"description":"The column holding Summary, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"responsibilities":{"description":"The column holding Responsibilities, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"requirements":{"description":"The column holding Requirements, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"payBand":{"description":"The column holding Pay band, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"payMin":{"description":"The column holding Pay from, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"payMax":{"description":"The column holding Pay up to, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"payCurrency":{"description":"The column holding Currency, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"payUnit":{"description":"The column holding Paid per, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"preview":{"description":"true checks every row and saves nothing.","type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.import.contractors":{"post":{"summary":"Bring contractors in from a table: source notion with databaseId (the database's link or ID), or source csv with rows. mapping names the column for any fields whose column names don't match (null for none); the others are matched by name, and a column that isn't in the table is reported in problems. A required field no column matches is refused with the table's columns listed. Fields: name (required), legalName, workEmail, personalEmail, wiseEmail, wiseLink, phone, roles, jobRole, department, jurisdiction, address (split into street, city, province or state, postal code and country), city, postalCode, chargesSalesTax, salesTaxRate, discord, github, portfolio, startDate, notes, currency, and the bank columns accountHolderName, bankName, bankAddress, accountNumber, institutionNumber, transitNumber, routingNumber, iban and swiftBic. People already in Oatmilk are matched by email and then by name, and only have blanks filled in; new people are added without an invitation, and no one is emailed. jobRole is matched to a job role by title and level; a title with several levels takes the level whose pay band holds the person's current rate, and otherwise jobRoleLevels lists the levels to choose from. The address used to reach each person is work email, then personal, then Wise, unless emails (row reference to address) chooses another; a row with no email is left out until emails gives it one. Payment details are saved only when an administrator imports and only for someone with none yet, in the currency column's currency, else the bank's country's, else the person's country's, else CAD. They are validated, sealed and audited, and saving them doesn't email the contractor; a row whose details don't validate is still imported and listed in paymentProblems. Payment details are never returned, in a preview, a result or a message: each row's plan has paymentDetails with present, method (bank_transfer or wise_email), masked (at most the last four characters of the account number or IBAN, or the Wise email masked) and fields (the names of the details the row has), a Wise email is left out of emails and masked when it's the address used, and a column whose name says it holds payment or tax details is only read for the bank and Wise fields. With preview true nothing is saved and the plan for every row comes back.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_import_contractors","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.contractors"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["csv","notion"],"description":"notion reads a Notion database on the server; csv takes the rows of a parsed CSV file."},"rows":{"description":"For csv: each row as column name to value, at most 500.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"type":"string","maxLength":20000}}},"databaseId":{"description":"For notion: the database's link or ID. The database must be shared with the Oatmilk connection.","type":"string","minLength":1,"maxLength":2000},"mapping":{"description":"The column for any fields whose column names don't match (null for none). Fields left out, or every field when it's omitted, are matched by column name; the result returns the mapping it used, so a preview shows the suggested one.","type":"object","properties":{"name":{"description":"The column holding Name (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"legalName":{"description":"The column holding Legal name, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"workEmail":{"description":"The column holding Work email, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"personalEmail":{"description":"The column holding Personal email, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"wiseEmail":{"description":"The column holding Wise email, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"wiseLink":{"description":"The column holding Wise link, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"phone":{"description":"The column holding Phone, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"roles":{"description":"The column holding Roles, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"jobRole":{"description":"The column holding Job role, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"department":{"description":"The column holding Department, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"jurisdiction":{"description":"The column holding Province or country, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"description":"The column holding Address, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"description":"The column holding City, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"description":"The column holding Postal code, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"chargesSalesTax":{"description":"The column holding Charges GST/HST, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"salesTaxRate":{"description":"The column holding GST/HST rate, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"discord":{"description":"The column holding Discord, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"github":{"description":"The column holding GitHub, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"linkedin":{"description":"The column holding LinkedIn, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"portfolio":{"description":"The column holding Portfolio, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"startDate":{"description":"The column holding Start date, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"description":"The column holding Notes, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"currency":{"description":"The column holding Payment currency, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountHolderName":{"description":"The column holding Account holder, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankName":{"description":"The column holding Bank name, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankAddress":{"description":"The column holding Bank address, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountNumber":{"description":"The column holding Account number, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"institutionNumber":{"description":"The column holding Institution number, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"transitNumber":{"description":"The column holding Transit number, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"routingNumber":{"description":"The column holding Routing number, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"iban":{"description":"The column holding IBAN, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"swiftBic":{"description":"The column holding SWIFT/BIC, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"preview":{"description":"true checks every row and saves nothing.","type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"emails":{"description":"The address to use for a row, by the row's reference (its Notion page link, or Row 2, Row 3 for a CSV file), instead of work, personal, then Wise email.","type":"object","propertyNames":{"type":"string","maxLength":500},"additionalProperties":{"type":"string","maxLength":320}}},"required":["source"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.import.hours":{"post":{"summary":"Bring past timesheets in as history from a table (source notion with databaseId, the database's link or ID, or csv with rows; mapping names the column for any fields whose column names don't match, and the others are matched by name). Fields: contractor (or firstName and lastName, or email), period (a date or a range, with optional periodEnd), hours, and optional rate, amount, tax, currency, paid, notes and submitted. Rows are matched to contractors by email, then name. Imported hours appear in each contractor's history, spending and on-time insights, but never become pay periods or payouts. A row that is a timesheet already here (the same Notion page or CSV row, or the same contractor's for the same hours starting or ending the same day) updates it instead of adding a duplicate: edited dates, hours, rate, amount, GST/HST and notes are taken, a blank cell erases nothing, and Paid marks an unpaid timesheet paid but an unpaid row never marks a paid one unpaid. The result lists what was added, corrected and marked paid in saved (counts and rows) and in summaryText, and afterwards new unpaid timesheets are settled against bank payments already linked to the contractor (payments). A column whose name says it holds payment or tax details is never read, and problems says so when mapping names one. With preview true nothing is saved and changes says what would happen.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_import_hours","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.hours"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["csv","notion"],"description":"notion reads a Notion database on the server; csv takes the rows of a parsed CSV file."},"rows":{"description":"For csv: each row as column name to value, at most 500.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"type":"string","maxLength":20000}}},"databaseId":{"description":"For notion: the database's link or ID. The database must be shared with the Oatmilk connection.","type":"string","minLength":1,"maxLength":2000},"mapping":{"description":"The column for any fields whose column names don't match (null for none). Fields left out, or every field when it's omitted, are matched by column name; the result returns the mapping it used, so a preview shows the suggested one.","type":"object","properties":{"contractor":{"description":"The column holding Contractor (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"firstName":{"description":"The column holding First name, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"lastName":{"description":"The column holding Last name, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"description":"The column holding Email, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"period":{"description":"The column holding Period (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"periodEnd":{"description":"The column holding Period end, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"hours":{"description":"The column holding Hours (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"rate":{"description":"The column holding Rate, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"amount":{"description":"The column holding Amount, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"tax":{"description":"The column holding GST/HST, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"currency":{"description":"The column holding Currency, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"paid":{"description":"The column holding Paid, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"description":"The column holding Notes, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"submitted":{"description":"The column holding Submitted, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"preview":{"description":"true checks every row and saves nothing.","type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.import.agreements":{"post":{"summary":"Bring agreements and NDAs in from a contracts table such as the Notion Contractor Contracts database, or the NDAs from a documents table such as Contractors Documents (source notion with databaseId, the database's link or ID, or csv with rows). mapping names the column for any fields whose column names don't match; the rest are matched by name. Fields: contractor (or email), title, kind (a type column: NDA, Contract…), signed (a signed column), role, rate (hourly), currency, startDate, endDate, file (a Notion files column with the signed copy), fileUrl (a link to a copy kept elsewhere) and nda (an NDA link or file on a contract row). A signed agreement with a start date becomes a version of the contractor's terms from that date, unless terms starting that day are already on file; one without dates is recorded as signed with the dates not stated and never becomes terms, so it can't replace dated ones; an unsigned, draft or stale row is kept as an unsigned draft. The signed copy is kept: a file attached to a Notion row is brought in with the Notion file import and filed as the agreement's signed document (linked to its terms), and a copy that's only a link is recorded as signed elsewhere. NDAs are kept apart from the contractor agreement. The role is linked to a job role by title and, for a title with several levels, the level whose pay band holds the rate; otherwise jobRoleSuggestion says what to do, and a contractor with no job role gets the one their current agreement matches. A table without start dates only brings in its NDAs. Every row is kept by the row it came from, so importing again fills in what's missing (a signed copy, a job role) instead of adding it twice. Rows for someone not in Oatmilk are left out with the reason; a rate of $1 or less is read as none. Nothing is sent to sign and nobody is emailed. A column whose name says it holds payment or tax details is never read, and problems says so when mapping names one. With preview true nothing is saved, and each row says whether it's already on file (onFile) and where the table disagrees with the terms on file (conflict).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_import_agreements","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.agreements"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["csv","notion"],"description":"notion reads a Notion database on the server; csv takes the rows of a parsed CSV file."},"rows":{"description":"For csv: each row as column name to value, at most 500.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":200},"additionalProperties":{"type":"string","maxLength":20000}}},"databaseId":{"description":"For notion: the database's link or ID. The database must be shared with the Oatmilk connection.","type":"string","minLength":1,"maxLength":2000},"mapping":{"description":"The column for any fields whose column names don't match (null for none). Fields left out, or every field when it's omitted, are matched by column name; the result returns the mapping it used, so a preview shows the suggested one.","type":"object","properties":{"contractor":{"description":"The column holding Contractor (required), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"description":"The column holding Email, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"title":{"description":"The column holding Agreement, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"kind":{"description":"The column holding Type, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"signed":{"description":"The column holding Signed, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"role":{"description":"The column holding Role, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"rate":{"description":"The column holding Rate, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"rateUnit":{"description":"The column holding Paid per, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"currency":{"description":"The column holding Currency, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"startDate":{"description":"The column holding Start date, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"endDate":{"description":"The column holding End date, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"file":{"description":"The column holding Signed copy (file), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"fileUrl":{"description":"The column holding Signed copy (link), or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"nda":{"description":"The column holding NDA, or null when the table has none.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}}},"preview":{"description":"true checks every row and saves nothing.","type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.insights.get":{"post":{"summary":"Contractor spending and timesheet insights from imported timesheets and Oatmilk pay periods and payouts: money sent (linked bank payments, payouts paid outside Wise, and bank payments recorded when past timesheets were marked paid), money still owed (unpaid imported timesheets and payouts not yet paid), paid plus owed, what the work cost by the month it was done (payouts including GST/HST) next to money sent by payment month, GST/HST, hours, monthly and weekly (Monday) series with empty ones as zero, monthly and weekly averages, each contractor's totals, cost in each of the last twelve months, hours a week over the last four weeks against the four before, on-time and late timesheets with average days late, the most and least punctual (at least three timesheets), and a few plain observations and trends. Amounts are in minor units of one currency (CAD unless currency is given); other currencies are listed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_insights_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.insights.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Contractor spending and timesheet insights from imported timesheets and Oatmilk pay periods and payouts: money sent (linked bank payments, payouts paid outside Wise, and bank payments recorded when past timesheets were marked paid), money still owed (unpaid imported timesheets and payouts not yet paid), paid plus owed, what the work cost by the month it was done (payouts including GST/HST) next to money sent by payment month, GST/HST, hours, monthly and weekly (Monday) series with empty ones as zero, monthly and weekly averages, each contractor's totals, cost in each of the last twelve months, hours a week over the last four weeks against the four before, on-time and late timesheets with average days late, the most and least punctual (at least three timesheets), and a few plain observations and trends. Amounts are in minor units of one currency (CAD unless currency is given); other currencies are listed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_insights_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.insights.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.import.hoursSync":{"post":{"summary":"Sync past timesheets from the Notion Contractors Hours database in one step (databaseId once, its link or ID; later syncs leave it out and use the remembered one): checks the database, then adds new timesheets, corrects edited ones (dates, hours, rate, amount, GST/HST, notes) and marks unpaid ones paid when Notion says Paid (never the reverse), without duplicating any, then settles new unpaid timesheets against bank payments already linked to the contractor. Returns counts, the change for each row, the payments that settled timesheets or now need a person's OK, and a plain-words summary. Bank and tax columns are never read. Send a new idempotencyKey for each sync.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_import_hoursSync","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.hoursSync"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"databaseId":{"description":"The Contractors Hours database's link or ID. Needed once; Oatmilk remembers it, and later syncs leave it out.","type":"string","minLength":1,"maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.import.hoursSyncStatus":{"post":{"summary":"Whether Notion is connected, the remembered Contractors Hours database (id and title), whether it is synced automatically about every 6 hours, and how the last sync went.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_import_hoursSyncStatus","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.hoursSyncStatus"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Whether Notion is connected, the remembered Contractors Hours database (id and title), whether it is synced automatically about every 6 hours, and how the last sync went.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_import_hoursSyncStatus_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.import.hoursSyncStatus"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.history.paymentAsks.list":{"post":{"summary":"The open questions about a bank payment to a contractor that is close to, or covers some of, their unpaid imported timesheets but isn't an exact match: who was paid, the payment (date, amount, Wise or bank), the timesheets it would settle with their periods, hours and amounts, and why Oatmilk isn't sure. Answer each with contractorOps.history.paymentAsks.answer.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_paymentAsks_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.paymentAsks.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"The open questions about a bank payment to a contractor that is close to, or covers some of, their unpaid imported timesheets but isn't an exact match: who was paid, the payment (date, amount, Wise or bank), the timesheets it would settle with their periods, hours and amounts, and why Oatmilk isn't sure. Answer each with contractorOps.history.paymentAsks.answer.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_paymentAsks_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.paymentAsks.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.history.paymentAsks.answer":{"post":{"summary":"Answer a payment question (id, decision, idempotencyKey). paid marks the question's timesheets that are still unpaid paid, on the payment's date and with the payment (audited like contractorOps.history.markPaid); other records that the payment was for something else, and it is never matched to timesheets or asked about again.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_history_paymentAsks_answer","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.paymentAsks.answer"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["paid","other"],"description":"paid marks the question's unpaid timesheets paid, matched to the bank payment; other says the payment was for something else and it is never asked about again."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.history.list":{"post":{"summary":"List every contractor timesheet as history: rows imported from a Notion database or CSV file, Oatmilk pay periods with hours or a payout, and milestone payouts. Each has the contractor, period, hours, rate, payout in minor units (the imported amount, or hours × rate plus GST/HST), GST/HST, status paid or unpaid with how (paid in the imported table, marked paid in Oatmilk with the date and bank payment, or the payout's state), when it was submitted and how many days late, its source (imported or oatmilk), and historyId for imported rows. An imported row whose dates also have hours logged in Oatmilk is marked alsoInOatmilk and left out of totals so nothing counts twice. Filter by contractorId, status (all, paid, unpaid), source (all, imported, oatmilk), and from and to (periods overlapping those dates). Unpaid is sorted by contractor, oldest first, with each contractor's totals in groups; the other views are newest first. Totals cover every match, by currency.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"default":"all","type":"string","enum":["all","paid","unpaid"]},"source":{"default":"all","type":"string","enum":["all","imported","oatmilk"]},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List every contractor timesheet as history: rows imported from a Notion database or CSV file, Oatmilk pay periods with hours or a payout, and milestone payouts. Each has the contractor, period, hours, rate, payout in minor units (the imported amount, or hours × rate plus GST/HST), GST/HST, status paid or unpaid with how (paid in the imported table, marked paid in Oatmilk with the date and bank payment, or the payout's state), when it was submitted and how many days late, its source (imported or oatmilk), and historyId for imported rows. An imported row whose dates also have hours logged in Oatmilk is marked alsoInOatmilk and left out of totals so nothing counts twice. Filter by contractorId, status (all, paid, unpaid), source (all, imported, oatmilk), and from and to (periods overlapping those dates). Unpaid is sorted by contractor, oldest first, with each contractor's totals in groups; the other views are newest first. Totals cover every match, by currency.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","paid","unpaid"]}},{"name":"source","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","imported","oatmilk"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":200,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.history.markPaid":{"post":{"summary":"Record imported timesheets as paid, for example once the payroll that settled them went out: ids (the historyId of each imported row, up to 500), paidOn (today when omitted; never in the future), an optional transactionId of the bank payment that paid them (money out of an account, and then every row must be the same contractor's; it counts once as money sent even if it's linked to the contractor later), an optional note, and idempotencyKey. Rows already paid are left as they are and counted in alreadyPaid. Oatmilk pay periods aren't marked here; they're paid through their payouts. Importing the table again never marks them unpaid. Audited for each contractor.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_history_markPaid","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.markPaid"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"paidOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"transactionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"note":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["ids"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.history.allocations.get":{"post":{"summary":"What one contractor's payments and imported timesheets look like for sharing a payment across timesheets (contractorId; transactionId or payoutId to include that payment even when it isn't linked to them yet). payments lists each outgoing bank payment linked to them and each payment recorded in Oatmilk with no pay period, newest first, with its date, amount, kind (wise, bank or recorded), what it already gave which timesheets (allocations), and the timesheets an earlier Mark paid tied to it without amounts (legacyHistoryIds). timesheets lists their imported timesheets with the period, hours, amount (null for a fixed fee with no amount), what payments gave each, and whether it's unpaid, partly paid or paid and how. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_allocations_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.allocations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"payoutId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"What one contractor's payments and imported timesheets look like for sharing a payment across timesheets (contractorId; transactionId or payoutId to include that payment even when it isn't linked to them yet). payments lists each outgoing bank payment linked to them and each payment recorded in Oatmilk with no pay period, newest first, with its date, amount, kind (wise, bank or recorded), what it already gave which timesheets (allocations), and the timesheets an earlier Mark paid tied to it without amounts (legacyHistoryIds). timesheets lists their imported timesheets with the period, hours, amount (null for a fixed fee with no amount), what payments gave each, and whether it's unpaid, partly paid or paid and how. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_allocations_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.allocations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"transactionId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"payoutId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.history.allocations.save":{"post":{"summary":"Share one payment across several imported timesheets (weeks, two-week periods or parts of a month), or pay one timesheet from several payments. Send contractorId and either transactionId (an outgoing bank payment) or payoutId (a payment recorded in Oatmilk with no pay period) with the allocations of that payment, or historyId with the allocations of that timesheet. Each allocation is historyId, transactionId or payoutId, amountMinor, and closes (true counts a small shortfall, such as a fee, as paid in full). The list replaces what that payment (or timesheet) had; an empty list removes it, which is how a match is undone. A payment never gives more than it paid, a timesheet never takes more than it pays, and one payment pays one contractor. A timesheet its allocations cover (any allocation, when it has no amount) is marked paid on the latest payment's date; one no longer covered goes back to unpaid. Timesheets paid in their table or marked paid by hand keep that. Automatic matching leaves the payment alone afterwards. Optional note and idempotencyKey. Audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_history_allocations_save","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.allocations.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"payoutId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"historyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocations":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"historyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"payoutId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountMinor":{"type":"string","pattern":"^\\d{1,15}$"},"closes":{"type":"boolean"}},"required":["historyId","amountMinor"],"additionalProperties":false}},"note":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","allocations"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.history.rateBackfill.preview":{"post":{"summary":"Preview imported timesheets missing a source amount and rate, with the active hourly agreement covering each complete period. Shows which weeks are ready to save and which need review because an agreement changes, is missing, or has a currency or rate conflict. No data changes and no payout is prepared.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_rateBackfill_preview","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.rateBackfill.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Preview imported timesheets missing a source amount and rate, with the active hourly agreement covering each complete period. Shows which weeks are ready to save and which need review because an agreement changes, is missing, or has a currency or rate conflict. No data changes and no payout is prepared.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_history_rateBackfill_preview_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.rateBackfill.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.history.rateBackfill.apply":{"post":{"summary":"Save agreement-derived hourly rate snapshots for explicitly selected imported timesheets after reviewing the preview. Supply each history row id and expectedRevision plus idempotencyKey. Rechecks the agreement and source row atomically; a changed, split-rate or ambiguous week fails without saving any row. Does not mark paid, prepare, approve or send a payout.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_history_rateBackfill_apply","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.history.rateBackfill.apply"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["rows"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.endDecision":{"post":{"summary":"Decide about an agreement at or past its end date, with the active terms version id, its expectedRevision, decision, and idempotencyKey. 'continuing' keeps them working and paid without renewing and stops the end-date reminders; 'ending' lets it end, so no new pay periods start after the end date (it does not stop the contractor logging hours or their portal access); null takes the decision back. An end date alone never stops work. To extend an agreement on paper instead, send new terms with a later end date using contractorOps.terms.propose.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_endDecision","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.endDecision"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decision":{"anyOf":[{"type":"string","enum":["ending","continuing"]},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.confirm":{"post":{"summary":"Confirm a waiting version, such as terms Oatmilk read from an uploaded signed agreement, optionally correcting its terms or effective date and selecting a matching jobRoleId first, with id, expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_confirm","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"terms":{},"effectiveFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"jobRoleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.cancel":{"post":{"summary":"Withdraw an update that is waiting for signature or confirmation, with id, expectedRevision, a reason and idempotencyKey. A document already sent is voided so it can't be signed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_cancel","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.cancel"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.terms.read":{"post":{"summary":"Have the agreement reader agent read a signed agreement already on file for a contractor (envelopeId) and propose its terms as a draft to confirm: role, rate, pay schedule, hour limits, dates, notice, where the work is done and notable clauses, each with the words it came from. Nothing takes effect until a person confirms it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_terms_read","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.terms.read"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"envelopeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","envelopeId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.taxForms.get":{"post":{"summary":"What to issue or review for each contractor paid in a calendar year (calendarYear), based on the organization's formation country. For a Canadian organization: CRA administrative policy calls for a T4A when annual service fees exceed $500 before sales tax or any tax was deducted; non-residents who worked in Canada generally get a T4A-NR at any amount with 15% Regulation 105 withholding unless waived. For a U.S. organization: shows a review checklist and never labels payments as Canadian T4A slips; the accountant confirms W-9/W-8, payer and payee status, service source, payment type and channel, and applicable reporting. Certain 1099-NEC and 1099-MISC payments after 2025 use a $2,000 threshold. Foreign formations require local accountant review. Numbers are masked; addresses are not shown to accountants; no U.S. forms are filed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxForms_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxForms.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calendarYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["calendarYear"],"additionalProperties":false}}}}},"get":{"summary":"What to issue or review for each contractor paid in a calendar year (calendarYear), based on the organization's formation country. For a Canadian organization: CRA administrative policy calls for a T4A when annual service fees exceed $500 before sales tax or any tax was deducted; non-residents who worked in Canada generally get a T4A-NR at any amount with 15% Regulation 105 withholding unless waived. For a U.S. organization: shows a review checklist and never labels payments as Canadian T4A slips; the accountant confirms W-9/W-8, payer and payee status, service source, payment type and channel, and applicable reporting. Certain 1099-NEC and 1099-MISC payments after 2025 use a $2,000 threshold. Foreign formations require local accountant review. Numbers are masked; addresses are not shown to accountants; no U.S. forms are filed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxForms_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxForms.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"calendarYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.taxInfo.list":{"post":{"summary":"List every contractor with what their CRA slip still needs: the slip their residency calls for (T4A, T4A-NR, none, or unknown), tax numbers on file masked like •••-•••-286 (never in full), the mailing address check (missing or invalid parts by name), a legal name that differs between the contractor record and their profile, identity confirmation, and when their tax details were last requested. Filter with missingOnly or query. Fix a legal name with contractors.update (the record) or contractorOps.profiles.update (the profile).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxInfo_list","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"missingOnly":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"query":{"type":"string","maxLength":200}},"additionalProperties":false}}}}},"get":{"summary":"List every contractor with what their CRA slip still needs: the slip their residency calls for (T4A, T4A-NR, none, or unknown), tax numbers on file masked like •••-•••-286 (never in full), the mailing address check (missing or invalid parts by name), a legal name that differs between the contractor record and their profile, identity confirmation, and when their tax details were last requested. Filter with missingOnly or query. Fix a legal name with contractors.update (the record) or contractorOps.profiles.update (the profile).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxInfo_list_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"missingOnly","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.taxInfo.get":{"post":{"summary":"Read one contractor's tax info for slips (contractorId): masked tax numbers, the structured mailing address and its check, both legal names, identity confirmation, the last request, and the revisions an edit needs.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxInfo_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contractorId"],"additionalProperties":false}}}}},"get":{"summary":"Read one contractor's tax info for slips (contractorId): masked tax numbers, the structured mailing address and its check, both legal names, identity confirmation, the last request, and the revisions an edit needs.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_taxInfo_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"contractorId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.taxInfo.update":{"post":{"summary":"Add or replace a contractor's tax number (taxNumber: kind sin, bn, itn or foreign, the value, and country for a foreign number) or remove one (removeTaxNumber: the kind), with expectedRevision once that kind was saved before; and/or set the mailing address their slips go to (mailingAddress: line1 street, line2 unit, city, region province or state, postalCode, country) with expectedProfileRevision. A SIN must pass the check-digit test, a business number has 9 digits and an optional program account like RT0001, and a Canadian postal code looks like K1A 0B6. Numbers are stored encrypted and only ever returned masked; the audit log records that one changed, never the value. Finance can change a contractor's tax numbers at most 5 times an hour, and 50 times an hour across the organization (429 with Retry-After); a contractor's own portal saves have a separate budget, so neither can use up the other's. Nothing is returned about other contractors' numbers, except that an administrator in the dashboard saving a SIN or ITN is told who else has the same one (sameNumberAs).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_taxInfo_update","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taxNumber":{"type":"object","properties":{"kind":{"type":"string","enum":["sin","bn","itn","foreign"]},"value":{"type":"string","minLength":1,"maxLength":40},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}]}},"required":["kind","value"],"additionalProperties":false},"removeTaxNumber":{"type":"string","enum":["sin","bn","itn","foreign"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mailingAddress":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","pattern":"^([A-Za-z]{2})?$"}},"additionalProperties":false},"usTaxForm":{"anyOf":[{"type":"string","enum":["w9","w8ben","w8bene","unsure"]},{"type":"null"}]},"usTaxClassification":{"anyOf":[{"type":"string","enum":["individual","c_corporation","s_corporation","partnership","trust_estate","llc_c","llc_s","llc_p","other"]},{"type":"null"}]},"expectedProfileRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.taxInfo.request":{"post":{"summary":"Email a contractor who uses the portal to add what their slip still needs (their tax number and mailing address), naming the fields and asking them to use the portal, never email. Nothing is sent unless this is called. The request is recorded with its date, the record of a reasonable effort to get the SIN.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_taxInfo_request","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxInfo.request"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.taxForms.export":{"post":{"summary":"Download the T4A and T4A-NR worksheet for a calendarYear with full tax numbers, to type into the CRA's web forms, with a reason. Only an administrator in the dashboard can; the download is audited with the year and the number of slips, never the numbers. Not available to API keys or MCP clients.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_taxForms_export","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.taxForms.export"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calendarYear":{"type":"integer","minimum":2000,"maximum":2100},"reason":{"type":"string","minLength":5,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["calendarYear","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/contractorOps.settings.get":{"post":{"summary":"Read contractor operations preferences: reminder timing and limits, approvers, automatic payout preparation, default cadence, time zone, and Wise source currency.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_settings_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read contractor operations preferences: reminder timing and limits, approvers, automatic payout preparation, default cadence, time zone, and Wise source currency.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"contractorOps_settings_get_get","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/contractorOps.settings.update":{"post":{"summary":"Update contractor operations preferences with idempotencyKey and optional expectedRevision. Only supplied settings change.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractorOps_settings_update","tags":["contractorOps"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractorOps.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"settings":{"type":"object","properties":{"remindersEnabled":{"type":"boolean"},"hoursReminderLeadDays":{"type":"integer","minimum":0,"maximum":14},"lateReminderEveryDays":{"type":"integer","minimum":1,"maximum":14},"lateReminderMax":{"type":"integer","minimum":0,"maximum":10},"approvalReminderEveryDays":{"type":"integer","minimum":1,"maximum":14},"approvalReminderMax":{"type":"integer","minimum":0,"maximum":10},"profileReminderMax":{"type":"integer","minimum":0,"maximum":12},"approverEmails":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"autoPreparePayouts":{"type":"boolean"},"defaultCadence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"weekly"},"weekStartsOn":{"default":1,"type":"integer","minimum":0,"maximum":6},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"biweekly"},"anchorDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind","anchorDate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"semi_monthly"},"days":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":27},{"type":"integer","minimum":2,"maximum":28}]},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"monthly"},"day":{"default":1,"type":"integer","minimum":1,"maximum":28},"dueDaysAfterPeriod":{"default":1,"type":"integer","minimum":0,"maximum":30},"payWithinBusinessDays":{"default":5,"type":"integer","minimum":0,"maximum":30}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"}},"required":["kind"],"additionalProperties":false}]},"timezone":{"type":"string","minLength":3,"maxLength":60},"wiseSourceCurrency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"wiseTransferPurpose":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"wiseSourceOfFunds":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"paymentReferencePrefix":{"type":"string","pattern":"^[A-Za-z0-9 -]{0,10}$"},"payOnlyWhenAllApproved":{"type":"boolean"},"autoApprove":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxEntryHours":{"anyOf":[{"type":"number","minimum":0.25,"maximum":24},{"type":"null"}]},"maxWeeklyHours":{"anyOf":[{"type":"number","minimum":0.25,"maximum":168},{"type":"null"}]},"afterApprovedPeriods":{"type":"integer","minimum":0,"maximum":24}},"required":["enabled","maxEntryHours","maxWeeklyHours","afterApprovedPeriods"],"additionalProperties":false},"paydayHeadsUpDays":{"type":"integer","minimum":0,"maximum":14},"paymentBufferDays":{"type":"integer","minimum":0,"maximum":30},"hoursNotionDatabase":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["id","title"],"additionalProperties":false},{"type":"null"}]},"hoursNotionSync":{"type":"boolean"}},"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.list":{"post":{"summary":"List active and former accountants with their access, end dates and days left, plus pending invitations and access requests. Invitation links are never included.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_list","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List active and former accountants with their access, end dates and days left, plus pending invitations and access requests. Invitation links are never included.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_list_get","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountants.activity":{"post":{"summary":"Read an accountant's retained activity timeline (sign-ins, downloads, exports, requests, decisions, end-date changes and removal), newest first. Supply userId and optionally beforeId.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_activity","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.activity"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"beforeId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["userId"],"additionalProperties":false}}}}},"get":{"summary":"Read an accountant's retained activity timeline (sign-ins, downloads, exports, requests, decisions, end-date changes and removal), newest first. Supply userId and optionally beforeId.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_activity_get","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.activity"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"userId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"beforeId","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountants.access.update":{"post":{"summary":"Extend, shorten or clear an accountant's access end date and, optionally, change their access level to read, comment or prepare (exactly that preset, nothing more), with userId, expiresOn (YYYY-MM-DD or null) and/or preset, expectedRevision and idempotencyKey. Extra permissions never outlast the end date. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_access_update","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.access.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"expiresOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"type":"string","enum":["read","comment","prepare"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["userId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.invite":{"post":{"summary":"Invite an accountant by email with an access level (preset read, comment or prepare), an access end date (or null for no end date), optional name, firm and message, and an idempotency key. Returns the invitation and a private join link. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_invite","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invite"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"accessExpiresOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string","maxLength":200},"firm":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"preset":{"default":"read","type":"string","enum":["read","comment","prepare"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["email","accessExpiresOn"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.inviteMany":{"post":{"summary":"Invite up to 10 people from one accounting firm in one go. Each person has their own email, name, access level (preset) and end date; the firm name and message are shared. Returns which invitations were sent and which failed, each with its private join link. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_inviteMany","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.inviteMany"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firm":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"people":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"preset":{"default":"read","type":"string","enum":["read","comment","prepare"]},"accessExpiresOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","accessExpiresOn"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["people"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.invitations.preview":{"post":{"summary":"Preview the invitation email (subject, HTML and plain text) for an access level, end date, name and message before sending it. Sends nothing and contains no private link.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_invitations_preview","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320},"name":{"type":"string","maxLength":200},"firm":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"preset":{"default":"read","type":"string","enum":["read","comment","prepare"]},"accessExpiresOn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}}},"get":{"summary":"Preview the invitation email (subject, HTML and plain text) for an access level, end date, name and message before sending it. Sends nothing and contains no private link.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_invitations_preview_get","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"email","in":"query","required":false,"schema":{"type":"string","maxLength":320}},{"name":"name","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"firm","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"message","in":"query","required":false,"schema":{"type":"string","maxLength":2000}},{"name":"preset","in":"query","required":false,"schema":{"default":"read","type":"string","enum":["read","comment","prepare"]}},{"name":"accessExpiresOn","in":"query","required":false,"schema":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountants.invitations.update":{"post":{"summary":"Change a pending or expired accountant invitation: access level, end date, name, firm or message, with id, expectedRevision and idempotencyKey. Correcting the email address cancels the old link and sends a new invitation. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_invitations_update","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"preset":{"type":"string","enum":["read","comment","prepare"]},"accessExpiresOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"firm":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.comments.list":{"post":{"summary":"List accountants' questions on transactions and receipts with the replies to each, newest first. Filter by status (active, open, answered, resolved, all) or by one record with targetType and targetId. Contributors never see these.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_comments_list","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"default":"active","type":"string","enum":["active","open","answered","resolved","all"]},"targetType":{"type":"string","enum":["entry","receipt","contractor"]},"targetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}}},"get":{"summary":"List accountants' questions on transactions and receipts with the replies to each, newest first. Filter by status (active, open, answered, resolved, all) or by one record with targetType and targetId. Contributors never see these.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_comments_list_get","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"default":"active","type":"string","enum":["active","open","answered","resolved","all"]}},{"name":"targetType","in":"query","required":false,"schema":{"type":"string","enum":["entry","receipt","contractor"]}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountants.comments.reply":{"post":{"summary":"Reply to an accountant's question with id, body and idempotencyKey. The accountant sees the reply and gets a short email.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_comments_reply","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.comments.reply"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string","minLength":1,"maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.comments.resolve":{"post":{"summary":"Mark an accountant's question resolved with id, expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_comments_resolve","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.comments.resolve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.invitations.link":{"post":{"summary":"Return the private join link of a pending invitation again so it can be shared in your own message. Audited. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountants_invitations_link","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.link"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.invitations.resend":{"post":{"summary":"Email a pending accountant invitation again and restart its 14-day link window, with expectedRevision and idempotencyKey. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_invitations_resend","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.resend"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.invitations.revoke":{"post":{"summary":"Revoke a pending accountant invitation so its link stops working, with expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_invitations_revoke","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.invitations.revoke"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.remove":{"post":{"summary":"Remove an accountant now: ends access, revokes extra permissions and open requests, and removes the organization membership. Their history is kept. Requires userId, expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_remove","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["userId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.requests.decide":{"post":{"summary":"Approve or deny an accountant's access or more-time request with id, decision, optional expiresInDays (30, 90 or null), accessExpiresOn for more-time approvals, note, expectedRevision and idempotencyKey. Administrator access is required. MCP calls also require accounting:admin; the web agent asks for approval before changing outside access. Direct API requests cannot perform these access-granting actions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_requests_decide","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.requests.decide"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["approve","deny"]},"expiresInDays":{"anyOf":[{"anyOf":[{"type":"number","const":30},{"type":"number","const":90}]},{"type":"null"}]},"accessExpiresOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string","maxLength":1000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","decision","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountants.grants.revoke":{"post":{"summary":"Revoke an extra permission granted to an accountant, with id, expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountants_grants_revoke","tags":["accountants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountants.grants.revoke"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountant.access.get":{"post":{"summary":"Accountants only: read your access to this organization, its end date and days left, your permissions and your requests.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_access_get","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.access.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Accountants only: read your access to this organization, its end date and days left, your permissions and your requests.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_access_get_get","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.access.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountant.requests.create":{"post":{"summary":"Accountants only: ask for an extra permission with scope and reason, or for more time with kind more_time, an optional proposedUntil date and reason. Requires an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountant_requests_create","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.requests.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":[],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"scope","type":"string","enum":["scope","more_time"]},"scope":{"type":"string","enum":["comment","corrections","periods","documents","email"]},"proposedUntil":{"type":"string"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountant.welcome.update":{"post":{"summary":"Accountants only: save where you stopped in the welcome steps (see, first, ask, done), and whether you skipped or finished it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_welcome_update","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.welcome.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":[],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"step":{"type":"string","enum":["see","first","ask","done"]},"outcome":{"type":"string","enum":["skipped","finished"]}},"required":["step"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountant.comments.create":{"post":{"summary":"Accountants with comment access only: ask a question on one transaction (entry) or receipt with targetType, targetId, body and an idempotency key. The company is emailed a short grouped summary.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountant_comments_create","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.comments.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":[],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetType":{"type":"string","enum":["entry","receipt"]},"targetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string","minLength":1,"maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["targetType","targetId","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountant.changes.request":{"post":{"summary":"Accountants with corrections access only: ask the company to attach an existing receipt to a bank record (attach_receipt with entryId and receiptEntryId), match a receipt to a same-currency bank payment (settle_match with entryId and transactionId), or check which contractor a payment belongs to (contractor_attribution with contractorId and transactionId), with a reason and idempotency key. Nothing changes until a company administrator approves it; payouts, agreements and settings are never offered.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_changes_request","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.changes.request"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":[],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"attach_receipt"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","entryId","receiptEntryId","reason","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"settle_match"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","entryId","transactionId","reason","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contractor_attribution"},"contractorId":{"type":"string","minLength":1,"maxLength":200},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","contractorId","transactionId","reason","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/accountant.slips.readiness":{"post":{"summary":"Accountants only: contractor reporting readiness for one calendarYear, selected by the company's formation country. Canadian organizations show the indicated T4A/T4A-NR checklist; U.S. organizations show a review checklist and do not infer 1099 applicability from payment totals. The response includes fees, masked Canadian and U.S. taxpayer numbers, self-reported W-9/W-8 selection and missing company follow-up. Mailing addresses and full numbers are never included.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_slips_readiness","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.slips.readiness"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calendarYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["calendarYear"],"additionalProperties":false}}}}},"get":{"summary":"Accountants only: contractor reporting readiness for one calendarYear, selected by the company's formation country. Canadian organizations show the indicated T4A/T4A-NR checklist; U.S. organizations show a review checklist and do not infer 1099 applicability from payment totals. The response includes fees, masked Canadian and U.S. taxpayer numbers, self-reported W-9/W-8 selection and missing company follow-up. Mailing addresses and full numbers are never included.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_slips_readiness_get","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.slips.readiness"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"calendarYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountant.tax.request":{"post":{"summary":"Accountants only: ask the company to collect or confirm missing tax details for one contractor and calendar year. The request contains missing field names only, never tax number values, and goes to the company question queue.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accountant_tax_request","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.tax.request"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendarYear":{"type":"integer","minimum":2000,"maximum":2100},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["contractorId","calendarYear"],"additionalProperties":false}}}}}},"/api/v1/accounting/accountant.changes.list":{"post":{"summary":"Accountants only: read the changes you asked the company to make and what was decided, newest first. Who decided is not shown.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_changes_list","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.changes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"default":"all","type":"string","enum":["pending","all"]},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}}},"get":{"summary":"Accountants only: read the changes you asked the company to make and what was decided, newest first. Who decided is not shown.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_changes_list_get","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.changes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["pending","all"]}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accountant.comments.list":{"post":{"summary":"Accountants with comment access only: read the questions and replies on one record (targetType and targetId), or the most recent ones on any record.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_comments_list","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetType":{"type":"string","enum":["entry","receipt","contractor"]},"targetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}}},"get":{"summary":"Accountants with comment access only: read the questions and replies on one record (targetType and targetId), or the most recent ones on any record.","description":"Required scopes: accounting:read. Allowed roles: . Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accountant_comments_list_get","tags":["accountant"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accountant.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":[],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"targetType","in":"query","required":false,"schema":{"type":"string","enum":["entry","receipt","contractor"]}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.list":{"post":{"summary":"List data sources files and records can be imported from (Notion, and Google Drive once an admin connects it with connectors.googleDrive.connect; OneDrive is listed as not available yet), with connection status, pinned databases and databases mapped in Settings › Connectors.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_list","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List data sources files and records can be imported from (Notion, and Google Drive once an admin connects it with connectors.googleDrive.connect; OneDrive is listed as not available yet), with connection status, pinned databases and databases mapped in Settings › Connectors.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_list_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.search":{"post":{"summary":"Search a data source for databases and pages shared with Oatmilk, most recently edited first. Supply source, optional query, kind (database, page, file or any), cursor and limit. For google_drive it searches file and folder names across My Drive and shared drives (kind file leaves folders out; Drive has no databases).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_search","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"query":{"type":"string","maxLength":200},"kind":{"default":"any","type":"string","enum":["database","page","file","any"]},"cursor":{"type":"string","minLength":1,"maxLength":500},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"required":["source"],"additionalProperties":false}}}}},"get":{"summary":"Search a data source for databases and pages shared with Oatmilk, most recently edited first. Supply source, optional query, kind (database, page, file or any), cursor and limit. For google_drive it searches file and folder names across My Drive and shared drives (kind file leaves folders out; Drive has no databases).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_search_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"kind","in":"query","required":false,"schema":{"default":"any","type":"string","enum":["database","page","file","any"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":500}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.resolve":{"post":{"summary":"Open a pasted link or ID from a data source (for Notion: notion.so, app.notion.com, notion.site links, database and page IDs; for Google Drive: drive.google.com and docs.google.com links to files and folders, or a Drive ID). Returns whether it is a database or a page and the database ID to read rows from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_resolve","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.resolve"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"url":{"type":"string","minLength":1,"maxLength":2000}},"required":["source","url"],"additionalProperties":false}}}}},"get":{"summary":"Open a pasted link or ID from a data source (for Notion: notion.so, app.notion.com, notion.site links, database and page IDs; for Google Drive: drive.google.com and docs.google.com links to files and folders, or a Drive ID). Returns whether it is a database or a page and the database ID to read rows from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_resolve_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.resolve"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"url","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.schema":{"post":{"summary":"Read a database's columns with their types, options, number formats (and the currency they imply), related databases, and the columns suggested for a first view. Columns whose names say they hold payment or tax details list no options and can't be sorted or searched by.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_schema","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.schema"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"databaseId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},"required":["source","databaseId"],"additionalProperties":false}}}}},"get":{"summary":"Read a database's columns with their types, options, number formats (and the currency they imply), related databases, and the columns suggested for a first view. Columns whose names say they hold payment or tax details list no options and can't be sorted or searched by.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_schema_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.schema"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"databaseId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.rows":{"post":{"summary":"Read rows of a database with readable, typed values for every column: text, numbers with their format, dates, options, people, related page titles, checkboxes, links and attached files. Supports search, sort by a column, only rows with files, and cursor paging. With target, files already imported there are marked. File download addresses are never returned. Columns whose names say they hold payment or tax details (bank, account, transit, institution and routing numbers, IBAN, SWIFT/BIC, Wise or Interac addresses, SIN, SSN, business or tax numbers) read as [hidden], what they hold is hidden anywhere else in the rows too, and they're never searched or sorted by.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_rows","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.rows"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"databaseId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"},"cursor":{"type":"string","minLength":1,"maxLength":500},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"search":{"type":"string","maxLength":100},"sortBy":{"type":"string","minLength":1,"maxLength":200},"sortDirection":{"default":"descending","type":"string","enum":["ascending","descending"]},"withFiles":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"target":{"type":"string","enum":["receipts","tax_sources","signing_files","executed_agreements","contractor_agreements","company_documents"]}},"required":["source","databaseId"],"additionalProperties":false}}}}},"get":{"summary":"Read rows of a database with readable, typed values for every column: text, numbers with their format, dates, options, people, related page titles, checkboxes, links and attached files. Supports search, sort by a column, only rows with files, and cursor paging. With target, files already imported there are marked. File download addresses are never returned. Columns whose names say they hold payment or tax details (bank, account, transit, institution and routing numbers, IBAN, SWIFT/BIC, Wise or Interac addresses, SIN, SSN, business or tax numbers) read as [hidden], what they hold is hidden anywhere else in the rows too, and they're never searched or sorted by.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_rows_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.rows"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"databaseId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":500}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"sortDirection","in":"query","required":false,"schema":{"default":"descending","type":"string","enum":["ascending","descending"]}},{"name":"withFiles","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"target","in":"query","required":false,"schema":{"type":"string","enum":["receipts","tax_sources","signing_files","executed_agreements","contractor_agreements","company_documents"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.files":{"post":{"summary":"List the files attached to a row or page: files in file columns and files embedded in the page. For google_drive, itemId is a folder (its files, partial when there are more than 200) or a file (itself); Google Docs, Sheets and Slides are listed as PDFs. With target, files already imported there are marked. File download addresses are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_files","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.files"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"itemId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"},"target":{"type":"string","enum":["receipts","tax_sources","signing_files","executed_agreements","contractor_agreements","company_documents"]}},"required":["source","itemId"],"additionalProperties":false}}}}},"get":{"summary":"List the files attached to a row or page: files in file columns and files embedded in the page. For google_drive, itemId is a folder (its files, partial when there are more than 200) or a file (itself); Google Docs, Sheets and Slides are listed as PDFs. With target, files already imported there are marked. File download addresses are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_files_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.files"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"itemId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},{"name":"target","in":"query","required":false,"schema":{"type":"string","enum":["receipts","tax_sources","signing_files","executed_agreements","contractor_agreements","company_documents"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.importFiles":{"post":{"summary":"Import up to 25 files from a data source into Oatmilk: receipts (processed like uploaded receipts), tax_sources (supporting originals, no expense), signing_files (documents to send for signature), executed_agreements (agreements signed elsewhere; targetOptions parties, executedOn, title) contractor_agreements (draft documents; optional targetOptions contractorId, expectedContractorRevision and title create the draft agreement) or company_documents (incorporation papers and other company records: each is filed through intake as a company record, read, and fills the company profile's empty fields; the record is the document id). Sources are notion and google_drive. Each file is downloaded server-side, checked against its target's size limit and file types by its contents, and run through that target's usual upload path. Importing the same file into the same place again returns the existing record. Returns a result for each file. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"dataSources_importFiles","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.importFiles"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"target":{"type":"string","enum":["receipts","tax_sources","signing_files","executed_agreements","contractor_agreements","company_documents"]},"items":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"},"fileId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},"required":["itemId","fileId"],"additionalProperties":false}},"targetOptions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source","target","items"],"additionalProperties":false}}}}}},"/api/v1/accounting/dataSources.readText":{"post":{"summary":"Read the text of a CSV or plain-text file attached to a row or page (up to 2 MB, UTF-8), for example a bank statement to import with imports.preview and imports.commit. Nothing is stored.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_readText","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.readText"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"itemId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"},"fileId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},"required":["source","itemId","fileId"],"additionalProperties":false}}}}},"get":{"summary":"Read the text of a CSV or plain-text file attached to a row or page (up to 2 MB, UTF-8), for example a bank statement to import with imports.preview and imports.commit. Nothing is stored.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataSources_readText_get","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.readText"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["notion","google_drive","onedrive"]}},{"name":"itemId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}},{"name":"fileId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataSources.pin":{"post":{"summary":"Pin or unpin a database for everyone in the workspace so it appears first when importing. Supply source, databaseId, pinned and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"dataSources_pin","tags":["dataSources"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataSources.pin"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","enum":["notion","google_drive","onedrive"]},"databaseId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_.:-]+$"},"pinned":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source","databaseId","pinned"],"additionalProperties":false}}}}}},"/api/v1/accounting/dataImports.definitions":{"post":{"summary":"List what can be imported from a connected database (invoices and contractor payment history): each field with its type, whether it's required, and the kinds of columns it accepts, plus the databases imported from recently.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_definitions","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.definitions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List what can be imported from a connected database (invoices and contractor payment history): each field with its type, whether it's required, and the kinds of columns it accepts, plus the databases imported from recently.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_definitions_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.definitions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataImports.suggest":{"post":{"summary":"Suggest a column of a connected database (Notion) for each field of an import target, with a sample value per column, the status options found, and the mapping remembered for that database. Supply target, source and databaseId. A column whose name says it holds payment or tax details is marked sensitive, has no sample or options, and is never suggested or imported.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_suggest","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","enum":["invoices","contractor_payments"]},"source":{"default":"notion","type":"string","enum":["notion"]},"databaseId":{"type":"string","minLength":1,"maxLength":200}},"required":["target","databaseId"],"additionalProperties":false}}}}},"get":{"summary":"Suggest a column of a connected database (Notion) for each field of an import target, with a sample value per column, the status options found, and the mapping remembered for that database. Supply target, source and databaseId. A column whose name says it holds payment or tax details is marked sensitive, has no sample or options, and is never suggested or imported.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_suggest_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"target","in":"query","required":true,"schema":{"type":"string","enum":["invoices","contractor_payments"]}},{"name":"source","in":"query","required":false,"schema":{"default":"notion","type":"string","enum":["notion"]}},{"name":"databaseId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataImports.preview":{"post":{"summary":"Read every row of the database with a column mapping and group the rows: ready, needs a decision (a new or ambiguous customer or contractor, an invoice number already in Oatmilk, or a possible duplicate payment), already imported, can't import (with the reason), or left out. Nothing is saved. Payment and tax columns are never read, and what they hold is hidden anywhere else in the preview.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_preview","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","enum":["invoices","contractor_payments"]},"source":{"default":"notion","type":"string","enum":["notion"]},"databaseId":{"type":"string","minLength":1,"maxLength":200},"mapping":{"type":"object","properties":{"columns":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z]{2,40}$"},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"statusMap":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"string","enum":["sent","paid","partially_paid","overdue","void","draft","skip"]}},"defaultCurrency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"dateOrder":{"default":null,"anyOf":[{"type":"string","enum":["mdy","dmy"]},{"type":"null"}]},"reviewCustomers":{"type":"boolean"},"customerRelationPath":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"customerRelationDirect":{"type":"boolean"},"rowOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"object","properties":{"customerName":{"type":"string","maxLength":200},"number":{"type":"string","maxLength":60},"status":{"type":"string","enum":["sent","paid","partially_paid","void"]},"taxAmount":{"type":"string","maxLength":50},"paidOn":{"type":"string","maxLength":30}},"additionalProperties":false}}},"required":["columns"],"additionalProperties":false}},"required":["target","databaseId","mapping"],"additionalProperties":false}}}}},"get":{"summary":"Read every row of the database with a column mapping and group the rows: ready, needs a decision (a new or ambiguous customer or contractor, an invoice number already in Oatmilk, or a possible duplicate payment), already imported, can't import (with the reason), or left out. Nothing is saved. Payment and tax columns are never read, and what they hold is hidden anywhere else in the preview.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_preview_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"target","in":"query","required":true,"schema":{"type":"string","enum":["invoices","contractor_payments"]}},{"name":"source","in":"query","required":false,"schema":{"default":"notion","type":"string","enum":["notion"]}},{"name":"databaseId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"mapping","in":"query","required":true,"schema":{"type":"object","properties":{"columns":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z]{2,40}$"},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"statusMap":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"string","enum":["sent","paid","partially_paid","overdue","void","draft","skip"]}},"defaultCurrency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"dateOrder":{"default":null,"anyOf":[{"type":"string","enum":["mdy","dmy"]},{"type":"null"}]},"reviewCustomers":{"type":"boolean"},"customerRelationPath":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"customerRelationDirect":{"type":"boolean"},"rowOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"object","properties":{"customerName":{"type":"string","maxLength":200},"number":{"type":"string","maxLength":60},"status":{"type":"string","enum":["sent","paid","partially_paid","void"]},"taxAmount":{"type":"string","maxLength":50},"paidOn":{"type":"string","maxLength":30}},"additionalProperties":false}}},"required":["columns"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataImports.commit":{"post":{"summary":"Start an import in the background with the mapping and decisions: create or choose customers and contractors, link or skip invoice numbers already in Oatmilk, and import or skip possible duplicate payments. Invoices keep their original numbers without using the invoice sequence, paid rows get their payment, the first PDF becomes the invoice's PDF, and Notion rows are linked for sync. Contractor payments are recorded as paid outside Wise; no money is sent and nobody is emailed. Rows already imported are skipped. Returns the import to follow with dataImports.get. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"dataImports_commit","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.commit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","enum":["invoices","contractor_payments"]},"source":{"default":"notion","type":"string","enum":["notion"]},"databaseId":{"type":"string","minLength":1,"maxLength":200},"mapping":{"type":"object","properties":{"columns":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z]{2,40}$"},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"statusMap":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"string","enum":["sent","paid","partially_paid","overdue","void","draft","skip"]}},"defaultCurrency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"dateOrder":{"default":null,"anyOf":[{"type":"string","enum":["mdy","dmy"]},{"type":"null"}]},"reviewCustomers":{"type":"boolean"},"customerRelationPath":{"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"customerRelationDirect":{"type":"boolean"},"rowOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"object","properties":{"customerName":{"type":"string","maxLength":200},"number":{"type":"string","maxLength":60},"status":{"type":"string","enum":["sent","paid","partially_paid","void"]},"taxAmount":{"type":"string","maxLength":50},"paidOn":{"type":"string","maxLength":30}},"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"decisions":{"type":"object","properties":{"groups":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"create"}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"use"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["action","id"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"skip"}},"required":["action"],"additionalProperties":false}]}},"rows":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":200},"additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["skip","link","import"]}},"required":["action"],"additionalProperties":false}}},"additionalProperties":false},"rowIds":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["target","databaseId","mapping"],"additionalProperties":false}}}}}},"/api/v1/accounting/dataImports.get":{"post":{"summary":"Read one import with its progress, counts, the customers or contractors it added, and each row's outcome with a link to what it created.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one import with its progress, counts, the customers or contractors it added, and each row's outcome with a link to what it created.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_get_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataImports.history":{"post":{"summary":"List imports, newest first, with their source database, status and counts. Filter by target or database.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_history","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","enum":["invoices","contractor_payments"]},"databaseId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List imports, newest first, with their source database, status and counts. Filter by target or database.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_history_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"target","in":"query","required":false,"schema":{"type":"string","enum":["invoices","contractor_payments"]}},{"name":"databaseId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/dataImports.resume":{"post":{"summary":"Continue an import that paused before it finished, for example after a time limit. It continues as the person who started it. Supply idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"dataImports_resume","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.resume"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/dataImports.undo":{"post":{"summary":"Undo a contractor payment import: the payouts it recorded are cancelled when they haven't changed since, and the rows can be imported again. Imported invoices are voided from each invoice instead. Supply reason and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"dataImports_undo","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.undo"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":3,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/dataImports.files":{"post":{"summary":"Get short-lived download links for the files an imported invoice came with, and where it was imported from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_files","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.files"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetType":{"type":"string","enum":["invoice","contractor_payout"]},"targetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["targetType","targetId"],"additionalProperties":false}}}}},"get":{"summary":"Get short-lived download links for the files an imported invoice came with, and where it was imported from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"dataImports_files_get","tags":["dataImports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/dataImports.files"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"targetType","in":"query","required":true,"schema":{"type":"string","enum":["invoice","contractor_payout"]}},{"name":"targetId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.settings.get":{"post":{"summary":"Read the organization's Autopilot policy: whether AI runs after each sync, whether confident transactions are finished automatically, the smallest purchase that gets a receipt request, and how many days Oatmilk searches before asking.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_settings_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the organization's Autopilot policy: whether AI runs after each sync, whether confident transactions are finished automatically, the smallest purchase that gets a receipt request, and how many days Oatmilk searches before asking.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_settings_get_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.settings.update":{"post":{"summary":"Change the Autopilot policy with expectedRevision and idempotencyKey: enabled, autoComplete, runAfterSync, receiptRequestMinimumMinor (minor units), evidenceGraceDays, and stripeMissingTax (ask, or no_tax to treat Stripe payments without any tax record as having no GST/HST). Changes that let Oatmilk finish more re-check open transactions.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"autopilot_settings_update","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"enabled":{"type":"boolean"},"autoComplete":{"type":"boolean"},"runAfterSync":{"type":"boolean"},"receiptRequestMinimumMinor":{"type":"string","pattern":"^\\d{1,12}$"},"evidenceGraceDays":{"type":"integer","minimum":0,"maximum":60},"stripeMissingTax":{"type":"string","enum":["ask","no_tax"]}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/autopilot.status":{"post":{"summary":"Summarize Autopilot for the organization: bank lines not yet in the books, transactions waiting for AI, how many need a person, and the most recent jobs.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_status","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Summarize Autopilot for the organization: bank lines not yet in the books, transactions waiting for AI, how many need a person, and the most recent jobs.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_status_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.summary":{"post":{"summary":"A light Autopilot summary for Home: whether Autopilot is on, and how many transactions it finished in total and this week. Cheap to call; use autopilot.status for the full backlog.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_summary","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"A light Autopilot summary for Home: whether Autopilot is on, and how many transactions it finished in total and this week. Cheap to call; use autopilot.status for the full backlog.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_summary_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.jobs.start":{"post":{"summary":"Start an Autopilot job. kind autopilot processes everything new or changed; kind rerun re-evaluates every transaction in an optional date range, account list or entry list, and onlyOpen skips finished ones. Transactions a person already finished or corrected are never overwritten. Returns the queued job.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"autopilot_jobs_start","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.start"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"autopilot","type":"string","enum":["autopilot","rerun"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"accountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"entryIds":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"onlyOpen":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/autopilot.jobs.list":{"post":{"summary":"List recent Autopilot jobs with status, progress counts and timing.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_jobs_list","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":100},"status":{"type":"string","enum":["queued","running","completed","failed","canceled"]}},"additionalProperties":false}}}}},"get":{"summary":"List recent Autopilot jobs with status, progress counts and timing.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_jobs_list_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","running","completed","failed","canceled"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.jobs.get":{"post":{"summary":"Read one Autopilot job with its progress: processed, finished automatically, needing a person, and failures.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_jobs_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one Autopilot job with its progress: processed, finished automatically, needing a person, and failures.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_jobs_get_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.jobs.cancel":{"post":{"summary":"Cancel a queued or running Autopilot job. Work already applied stays applied.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"autopilot_jobs_cancel","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.jobs.cancel"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/autopilot.classify":{"post":{"summary":"Run the Autopilot rules, classifier, evidence and tax checks for up to 25 entries now. With apply false it returns what Oatmilk would do without writing anything; with apply true it saves the result like a normal Autopilot pass.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"autopilot_classify","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.classify"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryIds":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"explanation":{"type":"string","minLength":3,"maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"apply":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/autopilot.explain":{"post":{"summary":"Explain an entry's Autopilot state: the classification and its source, evidence and tax status, the single action a person needs to take, and every step Oatmilk already tried.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_explain","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.explain"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Explain an entry's Autopilot state: the classification and its source, evidence and tax status, the single action a person needs to take, and every step Oatmilk already tried.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_explain_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.explain"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.rules.list":{"post":{"summary":"List the merchant category rules Oatmilk learned from people's corrections, with the category, how many times a person confirmed it, and whether it is on.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_rules_list","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.rules.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"active":{"type":"boolean"}},"additionalProperties":false}}}}},"get":{"summary":"List the merchant category rules Oatmilk learned from people's corrections, with the category, how many times a person confirmed it, and whether it is on.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"autopilot_rules_list_get","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.rules.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/autopilot.rules.update":{"post":{"summary":"Turn a learned merchant rule on or off, or change its category, with id, expectedRevision and idempotencyKey. Future Autopilot passes use the change; finished transactions stay as they are.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"autopilot_rules_update","tags":["autopilot"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/autopilot.rules.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"active":{"type":"boolean"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/attention.list":{"post":{"summary":"List what needs a person, grouped by the one action required (find a receipt, choose a category, confirm business use, confirm income or tax, match a payout, approve), with the newest items and the reason for each.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"attention_list","tags":["attention"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/attention.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":100},"kind":{"type":"string","enum":["forward_receipt","review_document","contractor_invoice","choose_contractor","choose_category","confirm_business","confirm_income","confirm_tax","match_payout","approve","import_statement","reimbursement_receipts"]},"questionOffset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List what needs a person, grouped by the one action required (find a receipt, choose a category, confirm business use, confirm income or tax, match a payout, approve), with the newest items and the reason for each.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"attention_list_get","tags":["attention"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/attention.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["forward_receipt","review_document","contractor_invoice","choose_contractor","choose_category","confirm_business","confirm_income","confirm_tax","match_payout","approve","import_statement","reimbursement_receipts"]}},{"name":"questionOffset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/attention.mine":{"post":{"summary":"List purchases on the caller's own cards that still need a receipt, newest first, with the card's last four digits, a page at a time: pass the returned nextCursor as cursor for the next page. total counts them all. A purchase someone already added a receipt for is left out while that receipt is matched. Finance assigns cardholders on each card; any member can read their own list and upload the receipts, with uploads.prepare receiptFor set to the purchase.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"attention_mine","tags":["attention"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/attention.mine"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":20,"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false}}}}},"get":{"summary":"List purchases on the caller's own cards that still need a receipt, newest first, with the card's last four digits, a page at a time: pass the returned nextCursor as cursor for the next page. total counts them all. A purchase someone already added a receipt for is left out while that receipt is matched. Finance assigns cardholders on each card; any member can read their own list and upload the receipts, with uploads.prepare receiptFor set to the purchase.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"attention_mine_get","tags":["attention"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/attention.mine"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mailboxes.list":{"post":{"summary":"List connected Gmail and Outlook inboxes: provider, address, who connected it, whether it is paused (scan_enabled false), checked daily (daily_checks) and offered for other members' receipts (search_for_others), the last scan, how many financial emails were imported, the latest check (a run with its status and summary), whether it is still catching up on older mail, whether scheduled checks are on, and which providers this deployment supports. Contributors see only their own. Tokens are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mailboxes_list","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List connected Gmail and Outlook inboxes: provider, address, who connected it, whether it is paused (scan_enabled false), checked daily (daily_checks) and offered for other members' receipts (search_for_others), the last scan, how many financial emails were imported, the latest check (a run with its status and summary), whether it is still catching up on older mail, whether scheduled checks are on, and which providers this deployment supports. Contributors see only their own. Tokens are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mailboxes_list_get","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mailboxes.connect.start":{"post":{"summary":"Start connecting the signed-in member's own Gmail or Outlook inbox with read-only access. Returns the provider's consent URL; the member finishes in the browser. dailyChecks (default on for Connected inboxes, explicitly off for onboarding and Find in my inbox) decides whether Oatmilk checks the new inbox every day, starting 90 days back; without it the inbox is read only when the member asks, from today. Reconnecting an inbox keeps it paused if it was, and only turns daily checks on, never off. Optional returnTo (a workspace page or /onboarding) brings them back there, popup reports back to the page that opened the window and closes it, and inboxSearchId starts that member's waiting inbox search as soon as the inbox connects. mode temporary (with inboxSearchId, never dailyChecks) asks for read-only access for that one search instead: no offline access, the token is held sealed for at most an hour, bound to that search and member, never checked daily or by anything else, never listed as a connected inbox, and revoked (where the provider allows) and wiped when the search finishes, is stopped or expires. These choices stay on the server behind a single-use nonce, and the exchange uses PKCE. Dashboard only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mailboxes_connect_start","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.connect.start"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["gmail","outlook"]},"loginHint":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"returnTo":{"type":"string","maxLength":500,"pattern":"^(?:\\/onboarding(?:[?#][^\\s\\\\]*)?|\\/(?:accounting|ops|inbox|checklist|calendar|ai|compliance|chief-of-staff|logs|history|developers|settings|finance|legal|people|insights)(?:[/?#][^\\s\\\\]*)?|\\/(?:[?#][^\\s\\\\]*)?)$"},"inboxSearchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"popup":{"type":"boolean"},"dailyChecks":{"type":"boolean"},"mode":{"type":"string","enum":["persistent","temporary"]}},"required":["provider"],"additionalProperties":false}}}}}},"/api/v1/accounting/mailboxes.connect.link":{"post":{"summary":"Get the link where the signed-in member connects their own Gmail or Outlook inbox in Oatmilk, with optional provider and dailyChecks. Nothing is connected and no sign-in starts: connecting asks the inbox owner to agree in the provider's own window, so only they can do it. Give the person the url; connected inboxes then appear in mailboxes.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mailboxes_connect_link","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.connect.link"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["gmail","outlook"]},"dailyChecks":{"type":"boolean"}},"additionalProperties":false}}}}},"get":{"summary":"Get the link where the signed-in member connects their own Gmail or Outlook inbox in Oatmilk, with optional provider and dailyChecks. Nothing is connected and no sign-in starts: connecting asks the inbox owner to agree in the provider's own window, so only they can do it. Give the person the url; connected inboxes then appear in mailboxes.list.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mailboxes_connect_link_get","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.connect.link"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"provider","in":"query","required":false,"schema":{"type":"string","enum":["gmail","outlook"]}},{"name":"dailyChecks","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mailboxes.update":{"post":{"summary":"Change a connected inbox with id, expectedRevision and idempotencyKey: scanEnabled pauses (false) or resumes (true) all reading, dailyChecks turns daily checks on (reading back 90 days) or off, searchForOthers lets Autopilot search it for other members' receipts, and scanFrom changes how far back it reads. Only the member who connected it can resume it or widen what is read, and only from the dashboard; an administrator can pause it or turn those off, and integrations can only narrow.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mailboxes_update","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"scanEnabled":{"type":"boolean"},"dailyChecks":{"type":"boolean"},"searchForOthers":{"type":"boolean"},"scanFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"scanIntervalMinutes":{"anyOf":[{"type":"number","const":60},{"type":"number","const":360},{"type":"number","const":1440}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mailboxes.disconnect":{"post":{"summary":"Disconnect a connected inbox and delete its stored access at once, with id, expectedRevision and idempotencyKey. Emails already imported stay in company mail. Only the member who connected it or an administrator can disconnect it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mailboxes_disconnect","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.disconnect"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mailboxes.scan":{"post":{"summary":"Check your own connected inbox for receipts and invoices now instead of waiting for the daily check; nobody can check another member's inbox, a paused one must be resumed first, and integrations need the mailboxes:search scope. Only financial emails are imported. Returns right away with the check's runId (status started, or busy with the running check's runId when one is already reading the inbox); follow it with runs.get for its steps and counts.","description":"Required scopes: accounting:read, accounting:write, mailboxes:search. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mailboxes_scan","tags":["mailboxes"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mailboxes.scan"},"x-required-scopes":["accounting:read","accounting:write","mailboxes:search"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/cards.list":{"post":{"summary":"List the card and account numbers (last four digits) Oatmilk uses to tell which account paid, with each one's account, cardholder and whether a person or Autopilot added it, whether each account is a bank account or a credit card, the members who can hold a card (with their names), and suggested cardholders for cards nobody holds yet, matched from the name printed on the card.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"cards_list","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the card and account numbers (last four digits) Oatmilk uses to tell which account paid, with each one's account, cardholder and whether a person or Autopilot added it, whether each account is a bank account or a credit card, the members who can hold a card (with their names), and suggested cardholders for cards nobody holds yet, matched from the name printed on the card.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"cards_list_get","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/cards.save":{"post":{"summary":"Add a card or account number (kind card_last4 or account_last4 and four digits) to an account, or change its label, cardholder or whether it is on, with idempotencyKey (and id with expectedRevision for changes). Receipts paid with that card are placed on its account. A number active on another account is refused.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"cards_save","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["card_last4","account_last4"]},"value":{"type":"string","pattern":"^\\d{4}$"},"label":{"type":"string","maxLength":80},"cardholderUserId":{"type":"string","maxLength":200},"cardholderName":{"type":"string","maxLength":120},"active":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/cards.claimable":{"post":{"summary":"Show unassigned company cards (last four digits, printed name and account only), the caller's original mine list of last-four strings, and ownedCards for editing. Own cards are marked removable only when the caller linked them. No transaction details are returned. The caller may edit an earlier answer, or is asked about unseen unassigned cards when holding none.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"cards_claimable","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.claimable"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Show unassigned company cards (last four digits, printed name and account only), the caller's original mine list of last-four strings, and ownedCards for editing. Own cards are marked removable only when the caller linked them. No transaction details are returned. The caller may edit an earlier answer, or is asked about unseen unassigned cards when holding none.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"cards_claimable_get","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.claimable"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/cards.claim":{"post":{"summary":"Update the caller's card claims atomically: identifierIds claims unassigned cards, releaseIdentifierIds releases only cards the caller personally claimed, seenIdentifierIds records what they reviewed, and idempotencyKey prevents duplicate saves. Other people's cards and finance-managed assignments cannot be changed; administrators reassign those in Cards.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"cards_claim","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.claim"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifierIds":{"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"releaseIdentifierIds":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"seenIdentifierIds":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["identifierIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/cards.prompt.dismiss":{"post":{"summary":"Answer \"None of these\" to \"Which of these cards are yours?\", with the seenIdentifierIds you were shown and idempotencyKey. You're asked again only about cards added later.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"cards_prompt_dismiss","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.prompt.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"seenIdentifierIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["seenIdentifierIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/cards.setAccountType":{"post":{"summary":"Mark an account as a bank account or a credit card with accountId, accountType, expectedRevision and idempotencyKey. Payments between a bank account and a credit card are then treated as transfers.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"cards_setAccountType","tags":["cards"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/cards.setAccountType"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountType":{"type":"string","enum":["bank","credit_card"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["accountId","accountType","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/chase.preview":{"post":{"summary":"Preview receipt reminders to cardholders without sending anything: the settings, each cardholder with purchases on their cards still missing receipts (how many, the oldest, the next tax deadline those purchases count toward, how often they're reminded right now, whether one is due today or when the next one goes out, and whether they paused or turned reminders off), the last reminders sent and the last replies with what the agent found in them.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chase_preview","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Preview receipt reminders to cardholders without sending anything: the settings, each cardholder with purchases on their cards still missing receipts (how many, the oldest, the next tax deadline those purchases count toward, how often they're reminded right now, whether one is due today or when the next one goes out, and whether they paused or turned reminders off), the last reminders sent and the last replies with what the agent found in them.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chase_preview_get","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chase.preferences.get":{"post":{"summary":"Read your own receipt reminders in this organization: status (active, paused or stopped) and pausedUntil. They're the emails listing purchases on your cards that still need a receipt. A pause that has run out reads as active.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chase_preferences_get","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.preferences.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own receipt reminders in this organization: status (active, paused or stopped) and pausedUntil. They're the emails listing purchases on your cards that still need a receipt. A pause that has run out reads as active.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chase_preferences_get_get","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.preferences.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chase.preferences.update":{"post":{"summary":"Change your own receipt reminders, like the links in every reminder: action pause (with days, 1 to 90, default 30), stop to turn them off, or resume to turn them back on, with idempotencyKey. It changes only your reminders, never anyone else's, and never the organization's reminder settings.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chase_preferences_update","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.preferences.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["pause","stop","resume"]},"days":{"type":"integer","minimum":1,"maximum":90},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["action"],"additionalProperties":false}}}}}},"/api/v1/accounting/chase.run":{"post":{"summary":"Send receipt reminders that are due now, or send one cardholder theirs now with userId. Each person gets at most one reminder a day, and never while they've paused or turned reminders off. Returns how many were sent and the refreshed preview.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chase_run","tags":["chase"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chase.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.financialIssue":{"post":{"summary":"Investigate one current financial-report component using its exact period, componentKey, expectedSourceFingerprint and idempotencyKey. Reads scoped originals and completed source facts before one proposal-only AI call. Existing settings, tenant AI access and limits apply; connected-inbox searches additionally require existing caller consent and mailboxes:search access. Returns evidence, attempted reads, a purpose explanation if supported, and the precise fact a person must confirm. Never changes financial fields, accepts proposals, sends email, imports receipts or approves accounting treatment. Same-key replay rechecks current report and source generations.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_financialIssue","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.financialIssue"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"componentKey":{"type":"string","minLength":1,"maxLength":200},"expectedSourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","componentKey","expectedSourceFingerprint"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.overview":{"post":{"summary":"Read the investigator: the caller's own consent to have their connected inbox searched and whether they have one connected, and for finance and administrators the organization's settings (on or off, email first or automatic, sources, lookback window in days, confidence needed to propose, maximum investigations a day, which asks it works on) and the 20 most recent investigations with their status and proposals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigator_overview","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the investigator: the caller's own consent to have their connected inbox searched and whether they have one connected, and for finance and administrators the organization's settings (on or off, email first or automatic, sources, lookback window in days, confidence needed to propose, maximum investigations a day, which asks it works on) and the 20 most recent investigations with their status and proposals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigator_overview_get","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/investigator.settings.update":{"post":{"summary":"Change the investigator's settings with expectedRevision and idempotencyKey: enabled, mode (email_first or automatic), sources (inbox only for now), lookbackDays (1-365), proposeThreshold (0.5-0.99), maxPerDay (1-100) and askKinds (forward_receipt, contractor_invoice, confirm_business, choose_category, confirm_income).","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_settings_update","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["email_first","automatic"]},"sources":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["inbox","discord","slack"]}},"lookbackDays":{"type":"integer","minimum":1,"maximum":365},"proposeThreshold":{"type":"number","minimum":0.5,"maximum":0.99},"maxPerDay":{"type":"integer","minimum":1,"maximum":100},"askKinds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["forward_receipt","contractor_invoice","confirm_business","choose_category","confirm_income"]}}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.consent.update":{"post":{"summary":"Allow or stop the investigator searching the caller's own connected inbox (inboxAllowed), with idempotencyKey and optional expectedRevision. Only ever changes the caller's own consent.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_consent_update","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.consent.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inboxAllowed":{"type":"boolean"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["inboxAllowed"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.forEntry":{"post":{"summary":"Read the investigation for one entry (entryId), if any: its status (awaiting the member, queued, running, proposed, no answer, accepted, dismissed or failed), what was tried, and the proposal with its answer, confidence, summary and evidence references (sender, subject, date and a short quote).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigator_forEntry","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.forEntry"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read the investigation for one entry (entryId), if any: its status (awaiting the member, queued, running, proposed, no answer, accepted, dismissed or failed), what was tried, and the proposal with its answer, confidence, summary and evidence references (sender, subject, date and a short quote).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigator_forEntry_get","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.forEntry"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/investigator.accept":{"post":{"summary":"Accept an investigator proposal with id, expectedRevision and idempotencyKey: applies its category, if any, and adds a note with the answer and its source to the entry through the normal entry update, then lets Autopilot recheck the entry.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_accept","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.accept"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.dismiss":{"post":{"summary":"Dismiss an investigator proposal or open investigation with id, expectedRevision and idempotencyKey. The entry keeps its normal ask for a person.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_dismiss","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigator.run":{"post":{"summary":"Run the investigator now for the organization, or investigate one entry (entryId) immediately. Members' consent and the daily limit still apply.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigator_run","tags":["investigator"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigator.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/evidence.inboxSearch.start":{"post":{"summary":"Search the caller's own connected Gmail or Outlook inbox for the receipt, invoice, or order confirmation of purchases that still need one, with entryIds (1 to 25) and idempotencyKey. Integrations also need the mailboxes:search scope; plain read and write access never grants it. Only the caller's own inbox is ever searched, and the request is the consent for this search only: each of their inboxes is read at most once per purchase and at most one email is copied for it, and it never changes daily checks or the investigator's consent. A purchase on another member's card is not searched (it stays with that member's ask), and a contributor can only search purchases on their own cards. A merchant email or nearby processor order may be copied after financial screening. On a member-requested search only, a recent Gmail forward whose preview is truncated may instead be copied after a bounded raw read proves the single forwarded original has a confirmed order, nearby original date, merchant, exact bank-currency grand total and card suffix, and the credential screen clears it; one later judged not to be financial evidence is removed again. The purchase it was found for is suggested to matching first, which still compares it with every likely transaction: it is attached only when matching would pick that purchase anyway, and left for review otherwise. Returns the search with each purchase's state (searching, reading, attached, review, not found or skipped) and its runId. With no usable inbox the search waits for the caller to connect or resume one (status waiting_for_inbox) and says which providers are available. A member can start 60 searches an hour, run five at once and search 250 purchases a day.","description":"Required scopes: accounting:read, accounting:write, mailboxes:search. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"evidence_inboxSearch_start","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.inboxSearch.start"},"x-required-scopes":["accounting:read","accounting:write","mailboxes:search"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryIds":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"surface":{"type":"string","enum":["home","entry","ask","transactions","api","other"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/evidence.inboxSearch.get":{"post":{"summary":"Read an inbox search (id), or the latest search of each purchase (entryIds, comma-separated, up to 100): its status, runId, and each purchase's state and outcome with counts of emails found and screened. Contributors see only their own searches. Mail content is never returned, except the sender, subject and date of a receipt that was copied into company mail, for people who may read company mail.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"evidence_inboxSearch_get","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.inboxSearch.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryIds":{"type":"string","maxLength":3800,"pattern":"^[0-9a-f-]{36}(,[0-9a-f-]{36}){0,99}$"}},"additionalProperties":false}}}}},"get":{"summary":"Read an inbox search (id), or the latest search of each purchase (entryIds, comma-separated, up to 100): its status, runId, and each purchase's state and outcome with counts of emails found and screened. Contributors see only their own searches. Mail content is never returned, except the sender, subject and date of a receipt that was copied into company mail, for people who may read company mail.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"evidence_inboxSearch_get_get","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.inboxSearch.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"entryIds","in":"query","required":false,"schema":{"type":"string","maxLength":3800,"pattern":"^[0-9a-f-]{36}(,[0-9a-f-]{36}){0,99}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/evidence.inboxSearch.cancel":{"post":{"summary":"Stop an inbox search with id and idempotencyKey. Purchases not yet searched are cancelled, and no further inbox is read; one being read finishes and copies nothing more. Only the member who started it or an administrator can stop it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"evidence_inboxSearch_cancel","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.inboxSearch.cancel"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/transactions.get":{"post":{"summary":"Get one imported bank or card transaction by id: amount, date, account, statement text, what it is matched to (allocations with their transactions and entries), and the facts the bank supplied such as merchant, card, cardholder and exchange details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_get","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get one imported bank or card transaction by id: amount, date, account, statement text, what it is matched to (allocations with their transactions and entries), and the facts the bank supplied such as merchant, card, cardholder and exchange details.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_get_get","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.candidates":{"post":{"summary":"List what an entry could be matched with, best first. For a receipt: unmatched bank or card lines in the same direction across available history, ranked by amount (including a charge in another currency that names the receipt amount), vendor name, what people matched before, and how usual the date gap is. For a bank entry: unlinked receipts with the same amount across available history. Each candidate has its amount, date, a name and why it was suggested. Confirm with accounting_match_transaction or accounting_attach_receipt.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_candidates","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":10,"type":"integer","minimum":1,"maximum":20}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"List what an entry could be matched with, best first. For a receipt: unmatched bank or card lines in the same direction across available history, ranked by amount (including a charge in another currency that names the receipt amount), vendor name, what people matched before, and how usual the date gap is. For a bank entry: unlinked receipts with the same amount across available history. Each candidate has its amount, date, a name and why it was suggested. Confirm with accounting_match_transaction or accounting_attach_receipt.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_candidates_get","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/exchangeRates.get":{"post":{"summary":"Get the Bank of Canada daily exchange rate for a day, as units of quote for one base (for example base USD, quote CAD, date 2026-09-25). Pairs without CAD are crossed through CAD; a weekend or holiday uses the closest earlier business day. Returns the rate, the day it was published for, the series and a source description to keep with a match or tax review. Reads bankofcanada.ca and never changes anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"exchangeRates_get","tags":["exchangeRates"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/exchangeRates.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"base":{"type":"string","pattern":"^[A-Z]{3}$"},"quote":{"type":"string","pattern":"^[A-Z]{3}$"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["base","quote","date"],"additionalProperties":false}}}}},"get":{"summary":"Get the Bank of Canada daily exchange rate for a day, as units of quote for one base (for example base USD, quote CAD, date 2026-09-25). Pairs without CAD are crossed through CAD; a weekend or holiday uses the closest earlier business day. Returns the rate, the day it was published for, the series and a source description to keep with a match or tax review. Reads bankofcanada.ca and never changes anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"exchangeRates_get_get","tags":["exchangeRates"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/exchangeRates.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"base","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"quote","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/onboarding.status":{"post":{"summary":"Read a new workspace's setup: whether onboarding is finished, the receipt address, its kind (company or personal), and which steps are done (company details, a bank account or connection, a first receipt or connected inbox, a teammate, and AI keys that cover decisions or Oatmilk's AI credits; a personal workspace has only the bank, receipt and AI steps).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"onboarding_status","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read a new workspace's setup: whether onboarding is finished, the receipt address, its kind (company or personal), and which steps are done (company details, a bank account or connection, a first receipt or connected inbox, a teammate, and AI keys that cover decisions or Oatmilk's AI credits; a personal workspace has only the bank, receipt and AI steps).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"onboarding_status_get","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/onboarding.complete":{"post":{"summary":"Finish or skip onboarding for the workspace with an idempotencyKey (skipped true when skipping). Finishing again keeps the first time.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"onboarding_complete","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.complete"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"skipped":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/onboarding.inboxPrompt":{"post":{"summary":"Whether the signed-in member should see the optional read-only Gmail or Outlook connection suggestion, and which providers are configured. A connected inbox or this member's Not now answer hides it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"onboarding_inboxPrompt","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.inboxPrompt"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Whether the signed-in member should see the optional read-only Gmail or Outlook connection suggestion, and which providers are configured. A connected inbox or this member's Not now answer hides it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"onboarding_inboxPrompt_get","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.inboxPrompt"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/onboarding.inboxPrompt.dismiss":{"post":{"summary":"Remember Not now for the signed-in member's optional inbox connection suggestion in this organization. Requires an idempotencyKey; it never changes another member's preference or any mailbox setting.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"onboarding_inboxPrompt_dismiss","tags":["onboarding"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/onboarding.inboxPrompt.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.prepare":{"post":{"summary":"Prepare a private upload for any file Oatmilk should file: a receipt, vendor bill, issued invoice, bank statement, contractor agreement, tax or company document. Supply filename, mimeType, sizeBytes, sha256, idempotencyKey and optional presetKind. A file already added to the organization returns duplicate: true with addedAt. Otherwise PUT the unchanged bytes to uploadUrl, then call intake.complete. Contributors can file receipts only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_prepare","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/webp","image/heic","image/heif","message/rfc822","text/csv","text/plain","text/markdown","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"source":{"default":"api","type":"string","enum":["drop","paste","picker","api"]},"presetKind":{"type":"string","enum":["receipt","vendor_bill","issued_invoice","bank_statement","contractor_agreement","tax_document","company_document","other"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.fromMail":{"post":{"summary":"File an attachment of an email in the workspace's mail (messageId, evidenceId, idempotencyKey) through universal intake: it becomes an uploaded file like a dropped one, ready for intake.classify and intake.process, and remembers the email it came from. Attachments of mail held for an administrator (quarantined, or holding sign-in or security details) can't be filed. The same file already added returns that upload with duplicate: true.","description":"Required scopes: accounting:read, accounting:write, mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_fromMail","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.fromMail"},"x-required-scopes":["accounting:read","accounting:write","mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["messageId","evidenceId"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.inline":{"post":{"summary":"Add any file Oatmilk should file in one call, for clients that can't upload to a link: filename, mimeType, contentBase64 (the file's bytes in base64, at most 2 MB), idempotencyKey and optional presetKind. Oatmilk checks the bytes, stores them privately and completes the upload, as intake.prepare, the upload and intake.complete do; a file already added returns duplicate: true. Then call intake.classify and intake.process. Retrying with the same key and file is safe. Contributors add receipts only. Larger files use intake.prepare.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_inline","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.inline"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","image/jpeg","image/png","image/webp","image/heic","image/heif","message/rfc822","text/csv","text/plain","text/markdown","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},"contentBase64":{"type":"string","minLength":4,"maxLength":2796204},"presetKind":{"type":"string","enum":["receipt","vendor_bill","issued_invoice","bank_statement","contractor_agreement","tax_document","company_document","other"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","contentBase64"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.complete":{"post":{"summary":"Verify an uploaded intake file's size, SHA-256 hash and type by id with an idempotency key. Returns the item, ready to classify or file.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_complete","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.complete"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.classify":{"post":{"summary":"Suggest what an uploaded file is and where it belongs from file-type and name rules, CSV columns, readable text and the accounting classifier. Returns kind, probability, accepted, reasons and a destination such as the bank account a statement belongs to. Nothing is filed until intake.process.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_classify","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.classify"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.process":{"post":{"summary":"File an uploaded item as a confirmed kind (receipt, vendor_bill, issued_invoice, bank_statement, contractor_agreement, tax_document, company_document or other) with an optional target: accountId or newAccount for a CSV statement; contractorId, or newContractor (displayName, email, optional legalName, and confirmedNew once a person checked they aren't someone with the same or a close name), for an agreement, a tax document or another record kept for a contractor; taxYear for a tax document; paymentAccountId for a receipt. An agreement for a contractor that matches the one already on file (same start and end dates, rate and role) is refused with SAME_AGREEMENT until sameAgreement says what to do: link (file this upload as that agreement, adding nothing), replace (keep this copy as the agreement and void the uploaded one on file; not for one signed in Oatmilk) or keep (keep both, without reading this one's terms). Receipts and bills enter receipt processing, CSV statements are imported, agreements are kept as signed agreements, and other records go to the documents store. An issued invoice waits for review in the invoice importer; send invoiceIds once it is imported. Idempotent. Contributors can file receipts only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_process","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.process"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["receipt","vendor_bill","issued_invoice","bank_statement","contractor_agreement","tax_document","company_document","other"]},"subtype":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"target":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newAccount":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","enum":["rbc","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lastFour":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"accountType":{"default":"bank","type":"string","enum":["bank","credit_card"]}},"required":["name","provider","currency"],"additionalProperties":false},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newContractor":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"legalName":{"type":"string","minLength":1,"maxLength":300},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"confirmedNew":{"type":"boolean"}},"required":["displayName","email"],"additionalProperties":false},"sameAgreement":{"type":"string","enum":["link","replace","keep"]},"taxYear":{"type":"integer","minimum":1990,"maximum":2100},"paymentAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false},"via":{"default":"manual","type":"string","enum":["suggestion","manual","preset"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"invoiceIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","kind"],"additionalProperties":false}}}}}},"/api/v1/accounting/intake.list":{"post":{"summary":"List uploaded files and where each one went. Filter with status (open, done, dismissed, all or one status), mine, search and since. Contributors see only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_list","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"default":"all","type":"string","enum":["open","done","dismissed","all","uploading","uploaded","classifying","suggested","confirmed","processing","failed"]},"mine":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"search":{"type":"string","maxLength":200},"since":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List uploaded files and where each one went. Filter with status (open, done, dismissed, all or one status), mine, search and since. Contributors see only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_list_get","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["open","done","dismissed","all","uploading","uploaded","classifying","suggested","confirmed","processing","failed"]}},{"name":"mine","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/intake.get":{"post":{"summary":"Read one uploaded file with its suggestion, decision and result. Contributors can read only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_get","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one uploaded file with its suggestion, decision and result. Contributors can read only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_get_get","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/intake.read":{"post":{"summary":"Read what an uploaded file says, by id, without filing or changing it: its words (text, at most 20,000 characters, with truncated true when cut short), its page count (pages), how many pages were read (readPages), whether the whole file was read (complete), and any warnings. Photos and PDFs are read with vision once and the reading is kept, so classifying the file later doesn't read it again; CSV, text, Word and email files are read directly. Spreadsheets come back without text. Payment and sign-in links are hidden, and a file holding sign-in or security details is refused. Contributors can read only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_read","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.read"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read what an uploaded file says, by id, without filing or changing it: its words (text, at most 20,000 characters, with truncated true when cut short), its page count (pages), how many pages were read (readPages), whether the whole file was read (complete), and any warnings. Photos and PDFs are read with vision once and the reading is kept, so classifying the file later doesn't read it again; CSV, text, Word and email files are read directly. Spreadsheets come back without text. Payment and sign-in links are hidden, and a file holding sign-in or security details is refused. Contributors can read only their own uploads.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"intake_read_get","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.read"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/intake.dismiss":{"post":{"summary":"Dismiss an uploaded file that should not be filed. With removeOriginal: true, the stored original is deleted too, for an accidental upload. Adding the same file again brings it back (and uploads it again when its original was removed). Filed files can't be dismissed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"intake_dismiss","tags":["intake"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/intake.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"removeOriginal":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.list":{"post":{"summary":"List kept records: tax documents (filed returns and schedules, GST/HST returns, notices of assessment and reassessment, CRA letters, payment confirmations, T4, T4A and T5 slips and summaries), company documents, bank statement PDFs and other records. Filter by kind (tax_document, company_document, bank_statement, other, company, contractor for any record filed with a contractor, or all), contractorId (records filed with one contractor, such as their tax forms and IDs, and invoices they attached to a pay period in the portal), contractorPeriodId (the invoices attached to one pay period), taxYear and search. Each record has its extracted fields, extraction status, contractorId and contractorPeriodId; with kind contractor or contractorId, contractorNames maps each contractor to their name.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"all","type":"string","enum":["tax_document","company_document","bank_statement","other","all","company","contractor"]},"taxYear":{"type":"integer","minimum":1990,"maximum":2100},"search":{"type":"string","maxLength":200},"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorPeriodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List kept records: tax documents (filed returns and schedules, GST/HST returns, notices of assessment and reassessment, CRA letters, payment confirmations, T4, T4A and T5 slips and summaries), company documents, bank statement PDFs and other records. Filter by kind (tax_document, company_document, bank_statement, other, company, contractor for any record filed with a contractor, or all), contractorId (records filed with one contractor, such as their tax forms and IDs, and invoices they attached to a pay period in the portal), contractorPeriodId (the invoices attached to one pay period), taxYear and search. Each record has its extracted fields, extraction status, contractorId and contractorPeriodId; with kind contractor or contractorId, contractorNames maps each contractor to their name.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"kind","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["tax_document","company_document","bank_statement","other","all","company","contractor"]}},{"name":"taxYear","in":"query","required":false,"schema":{"type":"integer","minimum":1990,"maximum":2100}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"contractorId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"contractorPeriodId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.get":{"post":{"summary":"Read one kept record by id with its fields, what the rules and the model extracted, the classifier's result and the upload it came from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one kept record by id with its fields, what the rules and the model extracted, the classifier's result and the upload it came from.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_get_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.download":{"post":{"summary":"Get a short-lived private link to a kept record's unchanged original file. Pass inline: true to open it in the browser instead of downloading it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_download","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inline":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived private link to a kept record's unchanged original file. Pass inline: true to open it in the browser instead of downloading it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_download_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"inline","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.update":{"post":{"summary":"Correct a kept record with id, expectedRevision and idempotencyKey: title, subtype, taxYear, periodStart, periodEnd, documentDate, contractorId, archived, and fields such as form, filedOn, assessedOn, businessNumber, programAccount, balanceOwingMinor, refundMinor, dueDate and referenceNumber. Edited fields are never overwritten by a later extraction.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_update","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"subtype":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},{"type":"null"}]},"taxYear":{"anyOf":[{"type":"integer","minimum":1990,"maximum":2100},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"documentDate":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"contractorId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9]{1,40}$"},"additionalProperties":{}},"archived":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.extract":{"post":{"summary":"Read a kept record's details again with the extraction model, keeping every field a person edited. Returns the record with extraction pending; poll documents.get for the result.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_extract","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.extract"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.content.get":{"post":{"summary":"Read a document's text to review or edit it: an agreement template written in the agreement writer (documentType agreement_template) or a contractor agreement template written in Oatmilk (contractor_template). Returns the title, revision, status (draft, published, archived, starter), the Markdown text in pages of up to 20,000 characters (offset and nextOffset), its headings, and for agreements the letterhead setting, merge fields, signers, footer, logo and the library images it places. Agreement Markdown uses {{field.key}} merge fields, a {{signatures}} line for the signature section and a \\pagebreak line for a page break.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_content_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.content.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","enum":["agreement_template","contractor_template"]},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"offset":{"default":0,"type":"integer","minimum":0,"maximum":500000},"limit":{"default":20000,"type":"integer","minimum":500,"maximum":20000}},"required":["documentType","documentId"],"additionalProperties":false}}}}},"get":{"summary":"Read a document's text to review or edit it: an agreement template written in the agreement writer (documentType agreement_template) or a contractor agreement template written in Oatmilk (contractor_template). Returns the title, revision, status (draft, published, archived, starter), the Markdown text in pages of up to 20,000 characters (offset and nextOffset), its headings, and for agreements the letterhead setting, merge fields, signers, footer, logo and the library images it places. Agreement Markdown uses {{field.key}} merge fields, a {{signatures}} line for the signature section and a \\pagebreak line for a page break.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_content_get_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.content.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentType","in":"query","required":true,"schema":{"type":"string","enum":["agreement_template","contractor_template"]}},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":500000}},{"name":"limit","in":"query","required":false,"schema":{"default":20000,"type":"integer","minimum":500,"maximum":20000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.content.edit":{"post":{"summary":"Edit an agreement template or contractor template in place with 1 to 50 operations applied together, all or nothing: replace_text, delete_text, insert_text (Markdown at the start or end, or before or after the block holding anchor text), place_signature_section (moves it if already placed), insert_page_break, replace_document, set_title, set_description, set_letterhead, set_field (label, required, default), remove_field, set_signers, and for agreements set_footer (up to two lines with merge fields and {{page}} / {{pages}}; null for the default footer), set_logo (a library image, or null for the company logo), insert_image (a library image with alt, width 10–100 percent and align), insert_saved_block (a saved block from documents.snippets.list) and insert_record_details (a record's details from documents.records.search as plain text: lines, values or table, optionally only some fields by key). Text is found by quoting it exactly, though spacing may differ; quote enough to be unique or pass occurrence. Pass expectedRevision to refuse if it changed since you read it; without it, quoted edits apply to the latest version. Anyone with it open in the agreement writer sees the change at once. Starter templates and uploaded files are read-only. Returns the new revision and a line per change.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_content_edit","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.content.edit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","enum":["agreement_template","contractor_template"]},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"replace_text"},"find":{"type":"string","minLength":1,"maxLength":2000},"replace":{"type":"string","maxLength":50000},"occurrence":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"string","const":"all"}]}},"required":["type","find","replace"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"delete_text"},"find":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"string","const":"all"}]}},"required":["type","find"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_text"},"markdown":{"type":"string","minLength":1,"maxLength":50000},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","markdown","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"place_signature_section"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_page_break"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"replace_document"},"markdown":{"type":"string","minLength":1,"maxLength":500000}},"required":["type","markdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_title"},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["type","title"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_description"},"description":{"type":"string","maxLength":1000}},"required":["type","description"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_letterhead"},"enabled":{"type":"boolean"}},"required":["type","enabled"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_field"},"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"defaultValue":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"multiline":{"type":"boolean"}},"required":["type","key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"remove_field"},"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"}},"required":["type","key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_signers"},"signers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"nameField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"internal":{"type":"boolean"}},"required":["label"],"additionalProperties":false}}},"required":["type","signers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_footer"},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["type","footer"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_logo"},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["type","assetId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_image"},"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alt":{"type":"string","maxLength":200},"width":{"type":"integer","minimum":10,"maximum":100},"align":{"type":"string","enum":["left","center","right"]},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","assetId","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_saved_block"},"snippetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","snippetId","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_record_details"},"recordType":{"type":"string","enum":["contractor","party","merchant","member","company"]},"recordId":{"type":"string","minLength":1,"maxLength":200},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"layout":{"type":"string","enum":["lines","values","table"]},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","recordType","recordId","position"],"additionalProperties":false}]}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["documentType","documentId","operations"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.assets.prepare":{"post":{"summary":"Start uploading an image for agreements, such as a logo, a diagram or a signature stamp: PNG or JPEG up to 10 MB and 6,000 pixels on a side, with its SHA-256. Pass saved: true to keep it in the library to reuse. Returns the image and, unless the organization already has this exact image, a private upload link: PUT the bytes there with their content type, then call documents.assets.confirm. Place a confirmed image in a template with a line ![Alt text](asset:<id>?width=50&align=center); width is 10–100 percent of the text width (default 100) and align is left, center or right (default center).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_assets_prepare","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.assets.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","enum":["image/png","image/jpeg"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":10485760},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"title":{"type":"string","maxLength":120},"saved":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.assets.confirm":{"post":{"summary":"Finish an image upload: checks the uploaded bytes against the declared type and SHA-256 and that the image can be printed, records its size, and returns it with a private link that shows it for about an hour.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_assets_confirm","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.assets.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.assets.list":{"post":{"summary":"List the images kept in the agreement library (logos, diagrams, stamps) with their titles, sizes and private links that show them for about an hour. Pass ids to get links for specific images, such as the ones a template places with asset:<id>.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_assets_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.assets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"search":{"type":"string","maxLength":120},"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"List the images kept in the agreement library (logos, diagrams, stamps) with their titles, sizes and private links that show them for about an hour. Pass ids to get links for specific images, such as the ones a template places with asset:<id>.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_assets_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.assets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"ids","in":"query","required":false,"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.assets.update":{"post":{"summary":"Rename an image, keep it in or take it out of the library (saved), or archive it, with id, expectedRevision and idempotencyKey. Archived images still print where they are already placed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_assets_update","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.assets.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","maxLength":120},"saved":{"type":"boolean"},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.snippets.list":{"post":{"summary":"List saved blocks (reusable clauses and passages in Markdown, which may use {{field.key}} merge fields) and saved footers (up to two lines, which may use merge fields and {{page}} / {{pages}}). Filter by kind block or footer and search titles.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_snippets_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.snippets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"all","type":"string","enum":["block","footer","all"]},"search":{"type":"string","maxLength":120},"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}}},"get":{"summary":"List saved blocks (reusable clauses and passages in Markdown, which may use {{field.key}} merge fields) and saved footers (up to two lines, which may use merge fields and {{page}} / {{pages}}). Filter by kind block or footer and search titles.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_snippets_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.snippets.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"kind","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["block","footer","all"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.snippets.create":{"post":{"summary":"Save a block of Markdown (kind block) or a footer (kind footer, up to 500 characters and two lines) to reuse in agreements, with a title and an idempotencyKey. Insert a saved block into a template with documents.content.edit insert_text.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_snippets_create","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.snippets.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["block","footer"]},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":20000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","title","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.snippets.update":{"post":{"summary":"Change a saved block's or footer's title or text, or archive it, with id, expectedRevision and idempotencyKey. Templates that already used it keep their own copy.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_snippets_update","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.snippets.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":20000},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.records.search":{"post":{"summary":"Find a record whose details can go into a document: contractors, customers and vendors (party), merchants, teammates (member) and the company itself. Filter by type and search by name or email. Returns each record's type, id, name and a short description; read its details with documents.records.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_records_search","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.records.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"default":"all","type":"string","enum":["contractor","party","merchant","member","company","all"]},"query":{"default":"","type":"string","maxLength":200},"limit":{"default":10,"type":"integer","minimum":1,"maximum":25}},"additionalProperties":false}}}}},"get":{"summary":"Find a record whose details can go into a document: contractors, customers and vendors (party), merchants, teammates (member) and the company itself. Filter by type and search by name or email. Returns each record's type, id, name and a short description; read its details with documents.records.get.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_records_search_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.records.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"type","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["contractor","party","merchant","member","company","all"]}},{"name":"query","in":"query","required":false,"schema":{"default":"","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":25}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.records.get":{"post":{"summary":"Read one record's details as labelled values to put into a document, such as a contractor's or customer's legal name, email, phone and address, a merchant's website, a teammate's name and role, or the company's legal name, address and business number. Pass type and id from documents.records.search (id is \"company\" for the company).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_records_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.records.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["contractor","party","merchant","member","company"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["type","id"],"additionalProperties":false}}}}},"get":{"summary":"Read one record's details as labelled values to put into a document, such as a contractor's or customer's legal name, email, phone and address, a merchant's website, a teammate's name and role, or the company's legal name, address and business number. Pass type and id from documents.records.search (id is \"company\" for the company).","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_records_get_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.records.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["contractor","party","merchant","member","company"]}},{"name":"id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.suggestions.list":{"post":{"summary":"List suggested changes to an agreement template (open ones by default, or all with status all). Each open suggestion includes a preview of what accepting it would do to the template as it is now: the blocks before and after and a line per change, or why it no longer applies.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_suggestions_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.suggestions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"default":"open","type":"string","enum":["open","all"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["documentType","documentId"],"additionalProperties":false}}}}},"get":{"summary":"List suggested changes to an agreement template (open ones by default, or all with status all). Each open suggestion includes a preview of what accepting it would do to the template as it is now: the blocks before and after and a line per change, or why it no longer applies.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_suggestions_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.suggestions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentType","in":"query","required":true,"schema":{"type":"string","const":"agreement_template"}},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","all"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.suggestions.create":{"post":{"summary":"Suggest changes to an agreement template for a person to review instead of making them: the same operations as documents.content.edit, with a one-line summary of what they do and why, and an idempotencyKey. Nothing changes until a person accepts it in the agreement writer; they can reject it instead. The operations must apply to the template as it is now. Use this when the person asks for suggestions or reviews changes first.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_suggestions_create","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.suggestions.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"summary":{"type":"string","minLength":1,"maxLength":500},"operations":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"replace_text"},"find":{"type":"string","minLength":1,"maxLength":2000},"replace":{"type":"string","maxLength":50000},"occurrence":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"string","const":"all"}]}},"required":["type","find","replace"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"delete_text"},"find":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"anyOf":[{"type":"integer","minimum":1,"maximum":500},{"type":"string","const":"all"}]}},"required":["type","find"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_text"},"markdown":{"type":"string","minLength":1,"maxLength":50000},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","markdown","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"place_signature_section"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_page_break"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"replace_document"},"markdown":{"type":"string","minLength":1,"maxLength":500000}},"required":["type","markdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_title"},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["type","title"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_description"},"description":{"type":"string","maxLength":1000}},"required":["type","description"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_letterhead"},"enabled":{"type":"boolean"}},"required":["type","enabled"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_field"},"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"label":{"type":"string","minLength":1,"maxLength":120},"required":{"type":"boolean"},"defaultValue":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"multiline":{"type":"boolean"}},"required":["type","key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"remove_field"},"key":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"}},"required":["type","key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_signers"},"signers":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"nameField":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_.]{0,80}$"},"internal":{"type":"boolean"}},"required":["label"],"additionalProperties":false}}},"required":["type","signers"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_footer"},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["type","footer"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"set_logo"},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["type","assetId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_image"},"assetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"alt":{"type":"string","maxLength":200},"width":{"type":"integer","minimum":10,"maximum":100},"align":{"type":"string","enum":["left","center","right"]},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","assetId","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_saved_block"},"snippetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","snippetId","position"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"insert_record_details"},"recordType":{"type":"string","enum":["contractor","party","merchant","member","company"]},"recordId":{"type":"string","minLength":1,"maxLength":200},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"layout":{"type":"string","enum":["lines","values","table"]},"position":{"type":"string","enum":["start","end","before","after"]},"anchor":{"type":"string","minLength":1,"maxLength":2000},"occurrence":{"type":"integer","minimum":1,"maximum":500}},"required":["type","recordType","recordId","position"],"additionalProperties":false}]}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["documentType","documentId","summary","operations"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.suggestions.decide":{"post":{"summary":"Accept or reject a suggested change with id, expectedRevision, decision (accept or reject), an optional note and an idempotencyKey. Accepting applies the suggestion to the template as it is now, in the same step as the decision, and is recorded in the audit trail; one that no longer applies can only be rejected. Ask AI can't decide; the person does in the writer.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_suggestions_decide","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.suggestions.decide"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decision":{"type":"string","enum":["accept","reject"]},"note":{"type":"string","maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.history.list":{"post":{"summary":"Read an agreement template's history, newest first: sessions of saves (who, when, through the writer, Ask AI, an AI app, the API, an accepted suggestion or a restore, and what changed: text, name, fields, signers, letterhead, footer or logo), publishing and archiving, and suggestions made, accepted or rejected. Pass before (the nextBefore it returned) for older history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_history_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"before":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"required":["documentType","documentId"],"additionalProperties":false}}}}},"get":{"summary":"Read an agreement template's history, newest first: sessions of saves (who, when, through the writer, Ask AI, an AI app, the API, an accepted suggestion or a restore, and what changed: text, name, fields, signers, letterhead, footer or logo), publishing and archiving, and suggestions made, accepted or rejected. Pass before (the nextBefore it returned) for older history.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_history_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentType","in":"query","required":true,"schema":{"type":"string","const":"agreement_template"}},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.history.get":{"post":{"summary":"Rebuild one saved version of an agreement template from its history (id from documents.history.list, and firstId to compare with the version before that session): its name, text, footer, letterhead, logo and signers, and the same for the version before.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_history_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.history.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"firstId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentType","documentId","id"],"additionalProperties":false}}}}},"get":{"summary":"Rebuild one saved version of an agreement template from its history (id from documents.history.list, and firstId to compare with the version before that session): its name, text, footer, letterhead, logo and signers, and the same for the version before.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_history_get_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.history.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentType","in":"query","required":true,"schema":{"type":"string","const":"agreement_template"}},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"firstId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.history.restore":{"post":{"summary":"Restore a saved version of an agreement template as a new change (id from documents.history.list and an idempotencyKey): its text, name, letterhead, footer, logo and signers go back, checked and audited like any edit. Earlier versions stay in the history.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_history_restore","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.history.restore"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["documentType","documentId","id"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.comments.members":{"post":{"summary":"List active finance and administrator members in this organization who can be tagged in document comments.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_comments_members","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.members"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List active finance and administrator members in this organization who can be tagged in document comments.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_comments_members_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.members"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.comments.list":{"post":{"summary":"Read comment threads and replies for an agreement template in this organization, including resolved threads and their anchored text.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_comments_list","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentType","documentId"],"additionalProperties":false}}}}},"get":{"summary":"Read comment threads and replies for an agreement template in this organization, including resolved threads and their anchored text.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documents_comments_list_get","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentType","in":"query","required":true,"schema":{"type":"string","const":"agreement_template"}},{"name":"documentId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documents.comments.create":{"post":{"summary":"Add an auditable comment thread to an agreement template. A text selection may be anchored; mention IDs must belong to active members of this organization. Requires an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_comments_create","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentType":{"type":"string","const":"agreement_template"},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"anchor":{"anyOf":[{"type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":1000000},"to":{"type":"integer","minimum":0,"maximum":1000000},"quote":{"type":"string","maxLength":2000},"before":{"default":"","type":"string","maxLength":100},"after":{"default":"","type":"string","maxLength":100}},"required":["from","to","quote"],"additionalProperties":false},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":10000},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["documentType","documentId","anchor","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.comments.reply":{"post":{"summary":"Add an auditable reply to an open agreement-template comment thread. Participants and newly mentioned active organization members receive in-app notifications. Requires an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_comments_reply","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.reply"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"threadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string","minLength":1,"maxLength":10000},"mentions":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["threadId","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/documents.comments.resolve":{"post":{"summary":"Resolve or reopen an agreement-template comment thread with its expected revision. The change is recorded in the audit trail. Requires an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documents_comments_resolve","tags":["documents"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documents.comments.resolve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"threadId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolved":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["threadId","expectedRevision","resolved"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.list":{"post":{"summary":"List project tags (which event or program a transaction is for): name, group (parent_id, one level deep), color, description, other names, event window (starts_on, ends_on), budget, archived state, the caller's last_used_at, and for finance spend, income, net and transaction counts by currency. A group's rollup counts each transaction once. Pass includeArchived to include archived tags. Contributors see active tags without totals or budgets.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_list","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List project tags (which event or program a transaction is for): name, group (parent_id, one level deep), color, description, other names, event window (starts_on, ends_on), budget, archived state, the caller's last_used_at, and for finance spend, income, net and transaction counts by currency. A group's rollup counts each transaction once. Pass includeArchived to include archived tags. Contributors see active tags without totals or budgets.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_list_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tags.get":{"post":{"summary":"Get one project tag with the tags inside it, its totals, profit and loss by category, a monthly timeline and the merchant rules Oatmilk learned for it. A group includes the tags inside it, counting each transaction once.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get one project tag with the tags inside it, its totals, profit and loss by category, a monthly timeline and the merchant rules Oatmilk learned for it. A group includes the tags inside it, counting each transaction once.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_get_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tags.report":{"post":{"summary":"Profit and loss by project tag for optional from/to dates and currency: spend, income and transaction counts per tag and per group, the deduplicated tagged total, untagged transactions, and overlap (transactions tagged to more than one project, which count in each). Currencies stay separate.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_report","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.report"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Profit and loss by project tag for optional from/to dates and currency: spend, income and transaction counts per tag and per group, the deduplicated tagged total, untagged transactions, and overlap (transactions tagged to more than one project, which count in each). Currencies stay separate.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_report_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.report"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tags.suggest":{"post":{"summary":"Suggest project tags for up to 100 entries (entryIds) from each tag's event window, learned merchant rules and notes or descriptions that mention the tag or its other names. Each suggestion has a score from 0 to 100 and its reasons. Suggestions don't count in totals until accepted with accounting_entries_tags_set.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_suggest","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}},"get":{"summary":"Suggest project tags for up to 100 entries (entryIds) from each tag's event window, learned merchant rules and notes or descriptions that mention the tag or its other names. Each suggestion has a score from 0 to 100 and its reasons. Suggestions don't count in totals until accepted with accounting_entries_tags_set.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_suggest_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryIds","in":"query","required":false,"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tags.create":{"post":{"summary":"Create a project tag with name and idempotencyKey, and optionally parentId (a group; groups are one level deep), color (gray, red, orange, amber, green, teal, blue, purple or pink), description, aliases (other names people write), startsOn/endsOn (the event window) and budgetMinor with budgetCurrency. Active tag names are unique.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_create","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","purple","pink"]},"aliases":{"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"parentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"startsOn":{"type":"string"},"endsOn":{"type":"string"},"budgetMinor":{"type":"string","pattern":"^\\d+$"},"budgetCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.update":{"post":{"summary":"Change a project tag with id, expectedRevision and idempotencyKey: rename, recolor, describe, set other names, move to a group or out of one (parentId null), set or clear the event window and budget, or archive and restore it (archived true or false). Archiving a group archives the tags inside it; restoring the group restores them.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_update","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","purple","pink"]},"aliases":{"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"startsOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"endsOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"budgetMinor":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"null"}]},"budgetCurrency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"archived":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.merge":{"post":{"summary":"Merge one project tag into another with sourceId, targetId, the source's expectedRevision and idempotencyKey: every transaction tagged with the source gets the target instead (once), learned rules and the tags inside a merged group move too, and the source is archived. The audit records every transaction moved.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_merge","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.merge"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["sourceId","targetId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.delete":{"post":{"summary":"Delete a project tag that was never used, with id, expectedRevision and idempotencyKey. A tag on any transaction, or holding other tags, can't be deleted: archive it or merge it instead.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_delete","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.delete"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.tags.set":{"post":{"summary":"Add, remove or dismiss project tags on up to 100 entries at once with entryIds, add, remove and dismiss (tag ids) and idempotencyKey; pass the same operationId with every batch of one bulk change. Adding a tag Oatmilk suggested accepts it; dismissing a suggestion stops it being suggested for that entry. Tags added through the API or MCP are recorded as such and don't confirm rules; finance's dashboard choices do. A rule tags open transactions by itself only for a tag with start and end dates, after two confirmations from separate actions and no rejection, from the day it qualified. Contributors can tag only their own receipts until finance reviews them. Tags don't change amounts, categories or tax.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_tags_set","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.tags.set"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"add":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remove":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"dismiss":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"operationId":{"type":"string","minLength":8,"maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.project.update":{"post":{"summary":"Set a project tag's status (planned, active or completed) or keywords (up to 20 words the classifier looks for) with tagId, idempotencyKey and optionally expectedRevision (the project's revision from tags.get). Changing keywords asks the project classifier to look at its transactions again. When the project syncs from Notion, a status set here that differs from Notion's is a conflict to resolve with accounting_tags_notion_resolve.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_project_update","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.project.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["planned","active","completed"]},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tagId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.notion.preview":{"post":{"summary":"Read a Notion page or database row before linking it to a project: supply page (a notion.so link or page ID) and, for an existing project, tagId. Returns its title, whether it is a row and in which database, suggested properties for dates, status, budget and description with every property that could hold each (choices) and the value each would read (propertyValues), the start of the page text the classifier would use, any problems, and with tagId the project's own values and what the first sync would change for each source of truth (firstSync). Review it, then pass the properties you chose to accounting_tags_notion_link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_notion_preview","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"page":{"type":"string","minLength":1,"maxLength":2000},"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["page"],"additionalProperties":false}}}}},"get":{"summary":"Read a Notion page or database row before linking it to a project: supply page (a notion.so link or page ID) and, for an existing project, tagId. Returns its title, whether it is a row and in which database, suggested properties for dates, status, budget and description with every property that could hold each (choices) and the value each would read (propertyValues), the start of the page text the classifier would use, any problems, and with tagId the project's own values and what the first sync would change for each source of truth (firstSync). Review it, then pass the properties you chose to accounting_tags_notion_link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_notion_preview_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"page","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2000}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tags.notion.link":{"post":{"summary":"Link a project to a Notion page or database row with page, sourceOfTruth (notion: name, dates, status, budget and description come from Notion; oatmilk: Oatmilk writes them to Notion) and idempotencyKey. Pass tagId (and optionally the project's expectedRevision) to link an existing project, or leave it out to create a project from the page (optionally parentId and color). For a database row, properties is required: the Notion property for each of dates, status, budget and description, or null to leave it out (accounting_tags_notion_preview suggests them; nothing is mapped silently). Linking syncs once straight away and never empties a filled field on either side: where one side is empty the filled value is kept, reads the page text as context for the classifier, and asks the classifier to suggest transactions for the project.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_notion_link","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"page":{"type":"string","minLength":1,"maxLength":2000},"sourceOfTruth":{"type":"string","enum":["oatmilk","notion"]},"properties":{"type":"object","properties":{"dates":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"status":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"budget":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"additionalProperties":false},"parentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"color":{"type":"string","enum":["gray","red","orange","amber","green","teal","blue","purple","pink"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["page","sourceOfTruth"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.notion.unlink":{"post":{"summary":"Stop syncing a project with Notion, with tagId and idempotencyKey. The project keeps its current name, dates, budget and description; nothing changes in Notion.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_notion_unlink","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.unlink"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tagId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.notion.sync":{"post":{"summary":"Sync a linked project with Notion now, with tagId and idempotencyKey (linked projects also sync about hourly). Fields change only on the side that isn't the source of truth. A field the other side changed since they last agreed is not overwritten: it is returned in project.conflicts for a person to resolve with accounting_tags_notion_resolve.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_notion_sync","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.sync"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tagId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.notion.resolve":{"post":{"summary":"Resolve a sync conflict on one field (name, dates, status, budget or description) with tagId, field, keep (notion writes Notion's value to Oatmilk; oatmilk writes Oatmilk's value to Notion) and idempotencyKey. Then syncs the project.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_notion_resolve","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.notion.resolve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string","enum":["name","dates","status","budget","description"]},"keep":{"type":"string","enum":["oatmilk","notion"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tagId","field","keep"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.ai.run":{"post":{"summary":"Ask the project classifier which transactions belong to a project, with tagId, idempotencyKey, optional limit (1 to 100, default 40) and recheck (look again at transactions it already answered). It reads transactions in the project's dates (and the 30 days before), or for a project without dates those that mention its name, other names or keywords, and uses the project's description, keywords and Notion page text. Likely matches become suggestions; unsure ones become questions (accounting_tags_ai_list verdict ask). A sure match tags a transaction by itself only while Autopilot is on and may finish work, for a project with a start and end date around an open transaction with no tag, dated on or after the project was set up; earlier transactions only get suggestions. An answer without probabilities counts as unsure. Returns counts.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tags_ai_run","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.ai.run"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":40,"type":"integer","minimum":1,"maximum":100},"recheck":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tagId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tags.ai.list":{"post":{"summary":"List what the project classifier suggested for a project (tagId, optional verdict likely or ask) that nobody has accepted or dismissed yet: each transaction's id, date, merchant, amount, currency and the classifier's probability. Accept with accounting_entries_tags_set add, or say no with dismiss.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_ai_list","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.ai.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"verdict":{"type":"string","enum":["likely","ask"]}},"required":["tagId"],"additionalProperties":false}}}}},"get":{"summary":"List what the project classifier suggested for a project (tagId, optional verdict likely or ask) that nobody has accepted or dismissed yet: each transaction's id, date, merchant, amount, currency and the classifier's probability. Accept with accounting_entries_tags_set add, or say no with dismiss.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tags_ai_list_get","tags":["tags"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tags.ai.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"tagId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"verdict","in":"query","required":false,"schema":{"type":"string","enum":["likely","ask"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceResearch.overview":{"post":{"summary":"Platform administrators only (the platform's own organization): the compliance research agent's schedule, official sources, memory of verified facts with their effective dates and sources, and findings, each an organization suggestion or a platform notice with its status and how organizations decided.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_overview","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only (the platform's own organization): the compliance research agent's schedule, official sources, memory of verified facts with their effective dates and sources, and findings, each an organization suggestion or a platform notice with its status and how organizations decided.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_overview_get","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceResearch.run":{"post":{"summary":"Platform administrators only: start a compliance research run now. It reads the official sources, remembers new facts, suggests setting changes to the organizations they apply to and tells platform administrators about changes only code can make. Returns the runId to follow with runs.get.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_run","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.settings.update":{"post":{"summary":"Platform administrators only: turn scheduled compliance research on or off (enabled) and set how often it runs (intervalDays, 7 to 365; 30 by default).","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_settings_update","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"intervalDays":{"type":"integer","minimum":7,"maximum":365},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.findings.update":{"post":{"summary":"Platform administrators only: mark a finding (usually a platform notice) acknowledged, done or dismissed.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_findings_update","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.findings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["open","acknowledged","done","dismissed"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","status","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.sources.add":{"post":{"summary":"Add an https page on an official Canadian or U.S. federal, provincial, state or territorial government host, a label and its jurisdiction (CA, US, CA-ON or US-TX style). Facts found on an organization's own source are suggested to that organization only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_sources_add","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.sources.add"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"label":{"type":"string","minLength":1,"maxLength":120},"jurisdiction":{"type":"string","pattern":"^(CA|US|CA-[A-Z]{2}|US-[A-Z]{2})$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["url","label","jurisdiction"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.sources.remove":{"post":{"summary":"Stop reading one of this organization's compliance research sources.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_sources_remove","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.sources.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.suggestions.list":{"post":{"summary":"Regulation updates for this organization: open suggestions to change a setting (receipt minimum, recommended category, GIFI line), each with the current and suggested value, whether a person set the current value, and its official source, plus recent decisions and this organization's own sources.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_suggestions_list","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.suggestions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Regulation updates for this organization: open suggestions to change a setting (receipt minimum, recommended category, GIFI line), each with the current and suggested value, whether a person set the current value, and its official source, plus recent decisions and this organization's own sources.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_suggestions_list_get","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.suggestions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceResearch.suggestions.decide":{"post":{"summary":"Decide a regulation update: accept applies it through the usual audited action (autopilot.settings.update, categories.addRecommended and categories.update, or tax.gifi.update); decline or keep leaves the setting as it is.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_suggestions_decide","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.suggestions.decide"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["accept","decline","keep"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","decision","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceResearch.chat.history":{"post":{"summary":"Platform administrators only: read your own recent compliance research conversation and cited official sources.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_chat_history","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.chat.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Platform administrators only: read your own recent compliance research conversation and cited official sources.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceResearch_chat_history_get","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.chat.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceResearch.chat.ask":{"post":{"summary":"Platform administrators only: ask the research agent about official tax sources, look up recent changes, or explicitly start the full compliance research flow. Ad-hoc answers do not change organization settings or tax calculations.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceResearch_chat_ask","tags":["complianceResearch"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceResearch.chat.ask"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":2,"maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["message"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.list":{"post":{"summary":"The compliance library Oatmilk keeps for every organization: guides by topic on hiring, contractors, agreements, employment standards, payroll, privacy and taxes, each with its plain-words summary, key points, what it means for a company, status (Current, Needs a look or Out of date) and when its official sources were last checked. editable says whether this member keeps the library; only the platform's administrators also see what was recently added and suggested new entries.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceLibrary_list","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"The compliance library Oatmilk keeps for every organization: guides by topic on hiring, contractors, agreements, employment standards, payroll, privacy and taxes, each with its plain-words summary, key points, what it means for a company, status (Current, Needs a look or Out of date) and when its official sources were last checked. editable says whether this member keeps the library; only the platform's administrators also see what was recently added and suggested new entries.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceLibrary_list_get","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceLibrary.get":{"post":{"summary":"One compliance library guide by id or slug with its official sources and check dates and its history. The platform's administrators also see the changes waiting for a person and the links and files added to it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceLibrary_get","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,78}[a-z0-9])?$"}},"additionalProperties":false}}}}},"get":{"summary":"One compliance library guide by id or slug with its official sources and check dates and its history. The platform's administrators also see the changes waiting for a person and the links and files added to it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"complianceLibrary_get_get","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"slug","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,78}[a-z0-9])?$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliancePortal.overview":{"post":{"summary":"The compliance portal's home for this member: topics with how many library guides each has, recently updated guides, rules from official sources coming into force soon, what waits for a decision (this organization's regulation updates for administrators; for the platform's administrators also changes only an Oatmilk update can follow and library changes), and the search index. platformAdmin says whether this member runs research for the platform.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliancePortal_overview","tags":["compliancePortal"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliancePortal.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"The compliance portal's home for this member: topics with how many library guides each has, recently updated guides, rules from official sources coming into force soon, what waits for a decision (this organization's regulation updates for administrators; for the platform's administrators also changes only an Oatmilk update can follow and library changes), and the search index. platformAdmin says whether this member runs research for the platform.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliancePortal_overview_get","tags":["compliancePortal"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliancePortal.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/compliancePortal.search":{"post":{"summary":"Search the compliance portal in plain words: library guides, rules from official sources, decisions waiting for this member and topics. Word matching shortlists candidates and a fast classifier (Jev) ranks what the person means. Optional kinds (entry, rule, item, topic) narrows it, limit up to 20. Each hit has its kind, title, the passage that matched and how relevant the classifier judged it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliancePortal_search","tags":["compliancePortal"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliancePortal.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":500},"limit":{"type":"integer","minimum":1,"maximum":20},"kinds":{"maxItems":4,"type":"array","items":{"type":"string","enum":["entry","rule","item","topic"]}}},"required":["query"],"additionalProperties":false}}}}},"get":{"summary":"Search the compliance portal in plain words: library guides, rules from official sources, decisions waiting for this member and topics. Word matching shortlists candidates and a fast classifier (Jev) ranks what the person means. Optional kinds (entry, rule, item, topic) narrows it, limit up to 20. Each hit has its kind, title, the passage that matched and how relevant the classifier judged it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"compliancePortal_search_get","tags":["compliancePortal"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/compliancePortal.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":500}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":20}},{"name":"kinds","in":"query","required":false,"schema":{"maxItems":4,"type":"array","items":{"type":"string","enum":["entry","rule","item","topic"]}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/complianceLibrary.entries.create":{"post":{"summary":"Platform administrators only: write a new compliance library entry (title, topic, and optional summary, keyPoints, meaning and markdown notes). A person's entry is protected: an agent's later change to it is proposed, never applied.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_entries_create","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.entries.create"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"topic":{"type":"string","enum":["hiring","contractors","agreements","employment","payroll","privacy","taxes"]},"summary":{"type":"string","maxLength":2000},"keyPoints":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":400}},"meaning":{"type":"string","maxLength":4000},"notes":{"type":"string","maxLength":20000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title","topic"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.entries.update":{"post":{"summary":"Platform administrators only: edit a compliance library entry's title, topic, summary, keyPoints, meaning or markdown notes at its current revision, archive or restore it (archived), or mark it looked at (resolved). Editing protects the entry from agent overwrites.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_entries_update","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.entries.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":200},"topic":{"type":"string","enum":["hiring","contractors","agreements","employment","payroll","privacy","taxes"]},"summary":{"type":"string","maxLength":2000},"keyPoints":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":400}},"meaning":{"type":"string","maxLength":4000},"notes":{"type":"string","maxLength":20000},"archived":{"type":"boolean"},"resolved":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.proposals.decide":{"post":{"summary":"Platform administrators only: accept or dismiss a change an agent proposed to an entry a person edited, or a suggested new entry from an uploaded document. Accepting applies the before-and-after shown and its official sources.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_proposals_decide","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.proposals.decide"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["accept","dismiss"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","decision","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.inputs.addUrl":{"post":{"summary":"Platform administrators only: add an official government page to the library. An agent reads it, links it to the right entry or updates it with the page as its source. Pages that are not on an official government host are refused. The page is untrusted data.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_inputs_addUrl","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.inputs.addUrl"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["url"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.files.prepare":{"post":{"summary":"Platform administrators only: prepare a private upload of a PDF, Word document, text file or picture (up to 25 MB) for the library. Returns a signed uploadUrl; then call complianceLibrary.files.confirm.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_files_prepare","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.files.prepare"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","image/png","image/jpeg","image/webp","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","text/markdown"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":26214400},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.files.confirm":{"post":{"summary":"Platform administrators only: confirm an uploaded library file. Oatmilk checks its size, hash and type, then an agent reads it as untrusted data, summarises it, links it to the right entry or suggests a new one, and flags entries it may affect.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_files_confirm","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.files.confirm"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/complianceLibrary.inputs.retry":{"post":{"summary":"Platform administrators only: read again a link or file that failed to be read.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"complianceLibrary_inputs_retry","tags":["complianceLibrary"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/complianceLibrary.inputs.retry"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.postings.list":{"post":{"summary":"List job postings with status (draft, open, closed), visibility (public on the job board, or private by link), hiring manager, stages, and how many applications are in each stage. Administrators and finance see every posting; others see postings whose hiring team they're on. canViewCandidates says whether candidate details can be opened.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_postings_list","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List job postings with status (draft, open, closed), visibility (public on the job board, or private by link), hiring manager, stages, and how many applications are in each stage. Administrators and finance see every posting; others see postings whose hiring team they're on. canViewCandidates says whether candidate details can be opened.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_postings_list_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.postings.get":{"post":{"summary":"Read one job posting with its description, pay, application questions, stages, hiring manager, the public job board address, and for private postings the private link to share with chosen candidates.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_postings_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one job posting with its description, pay, application questions, stages, hiring manager, the public job board address, and for private postings the private link to share with chosen candidates.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_postings_get_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.postings.save":{"post":{"summary":"Create a job posting (often from a job role with jobRoleId), or update one with id and expectedRevision: title, department, location, workplace (remote, hybrid, onsite), employmentType, description, payText, vacancyExists, aiAssist (disclosed on the posting), visibility (public or private), questions (key, label, type text/textarea/yes_no/select/url, required, options) and stages (Applied first, Hired last). The creator becomes hiring manager unless an administrator chooses someone; only an administrator or the current hiring manager can change it. New postings start as drafts.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_postings_save","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"posting":{"type":"object","properties":{"jobRoleId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":200},"department":{"type":"string","maxLength":120},"location":{"type":"string","maxLength":200},"workplace":{"type":"string","enum":["remote","hybrid","onsite"]},"employmentType":{"type":"string","enum":["contractor","employee","either"]},"description":{"type":"string","maxLength":40000},"payText":{"type":"string","maxLength":200},"vacancyExists":{"type":"boolean"},"aiAssist":{"type":"boolean"},"visibility":{"type":"string","enum":["public","private"]},"questions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":300},"type":{"type":"string","enum":["text","textarea","yes_no","select","url"]},"required":{"type":"boolean"},"options":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["key","label","type","required"],"additionalProperties":false}},"stages":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","minLength":1,"maxLength":60}},"required":["id","label"],"additionalProperties":false}},"hiringManagerUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["jobRoleId","title","department","location","workplace","employmentType","description","payText","vacancyExists","aiAssist","visibility","questions","stages","hiringManagerUserId"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["posting"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.postings.status":{"post":{"summary":"Open a posting to take applications, close it, or return it to draft, with id, status, expectedRevision and idempotencyKey. Administrators, finance and the hiring manager can do this. Public postings appear on the job board only while open.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_postings_status","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.status"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["draft","open","closed"]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","status","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.postings.rotateLink":{"post":{"summary":"Replace a posting's private link so the old link stops working, with id, expectedRevision and idempotencyKey. Returns the new link.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_postings_rotateLink","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.postings.rotateLink"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.board.get":{"post":{"summary":"Read the organization's public job board: its address, the name shown and the introduction.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_board_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.board.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the organization's public job board: its address, the name shown and the introduction.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_board_get_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.board.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.board.save":{"post":{"summary":"Set up or change the public job board: slug (its address, 3 to 60 lowercase letters, digits and dashes), displayName, intro, and expectedRevision after the first save.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_board_save","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.board.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,58}[a-z0-9]$"},"displayName":{"type":"string","minLength":1,"maxLength":200},"intro":{"type":"string","maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["slug","displayName"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.team.list":{"post":{"summary":"List the members who can be hiring managers or interviewers (administrators, finance and contributors, never accountants), with their email.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_team_list","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.team.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the members who can be hiring managers or interviewers (administrators, finance and contributors, never accountants), with their email.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_team_list_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.team.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.applications.list":{"post":{"summary":"List applications for one posting (postingId) or every posting you can see, filtered by status (active, rejected, hired) or a name search, with stage, source, resume presence, interviewers and a count of yes and no scorecards. Candidate details are visible to administrators and the posting's hiring manager; interviewers see only the applications they're assigned to, without email or phone.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_list","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"postingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["active","rejected","hired"]},"query":{"type":"string","maxLength":100}},"additionalProperties":false}}}}},"get":{"summary":"List applications for one posting (postingId) or every posting you can see, filtered by status (active, rejected, hired) or a name search, with stage, source, resume presence, interviewers and a count of yes and no scorecards. Candidate details are visible to administrators and the posting's hiring manager; interviewers see only the applications they're assigned to, without email or phone.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_list_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"postingId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","rejected","hired"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.applications.get":{"post":{"summary":"Read one application: the candidate, answers, cover letter, resume details, interviews, scorecards, timeline with notes, the candidate's other applications and possible duplicates (same name, different email). Interviewers see other people's scorecards only after submitting their own. Candidate details are visible to administrators and the posting's hiring manager; interviewers see only the applications they're assigned to, without email or phone.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one application: the candidate, answers, cover letter, resume details, interviews, scorecards, timeline with notes, the candidate's other applications and possible duplicates (same name, different email). Interviewers see other people's scorecards only after submitting their own. Candidate details are visible to administrators and the posting's hiring manager; interviewers see only the applications they're assigned to, without email or phone.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_get_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.applications.create":{"post":{"summary":"Add a candidate to a posting yourself (a referral or someone you sourced): postingId, candidate name, email, optional phone, location and links, source (referral, sourced, other), an optional note, and idempotencyKey. A person already in recruiting with that email is reused. Only administrators and the posting's hiring manager can do this.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_create","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"postingId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"candidate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"location":{"type":"string","maxLength":200},"links":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":500}}},"required":["name","email"],"additionalProperties":false},"source":{"default":"sourced","type":"string","enum":["referral","sourced","other"]},"note":{"type":"string","maxLength":5000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["postingId","candidate"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.move":{"post":{"summary":"Move an application to another stage of its posting with applicationId, stage, expectedRevision and idempotencyKey. Moving to Hired marks the candidate hired. Every move is recorded on the timeline.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_move","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.move"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"stage":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","stage","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.reject":{"post":{"summary":"Reject an application with applicationId, reason (not_qualified, experience, not_a_fit, compensation, location, withdrew, no_response, position_filled, duplicate, spam, other), an optional note, expectedRevision and idempotencyKey. Nothing is sent to the candidate.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_reject","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.reject"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","enum":["not_qualified","experience","not_a_fit","compensation","location","withdrew","no_response","position_filled","duplicate","spam","other"]},"note":{"type":"string","maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","reason","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.restore":{"post":{"summary":"Return a rejected application to its stage with applicationId, expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_restore","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.restore"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.assign":{"post":{"summary":"Set who interviews a candidate (interviewerUserIds, active members only) with applicationId, expectedRevision and idempotencyKey. Interviewers can then see the application and submit a scorecard.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_assign","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.assign"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"interviewerUserIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","interviewerUserIds","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.resume":{"post":{"summary":"Get a link, valid for one minute, to download an application's resume. Available to administrators, the hiring manager and assigned interviewers.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_resume","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.resume"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["applicationId"],"additionalProperties":false}}}}},"get":{"summary":"Get a link, valid for one minute, to download an application's resume. Available to administrators, the hiring manager and assigned interviewers.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_applications_resume_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.resume"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"applicationId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.applications.convert":{"post":{"summary":"Add a hired candidate as a contractor with applicationId and idempotencyKey: the contractor is created from their name and email (or an existing contractor with that email is linked) and given the posting's job role. No invitation is sent; invite them from Contractors when ready.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_convert","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.convert"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.applications.summarize":{"post":{"summary":"Have AI summarize an application against the posting (a short summary, strengths, gaps and questions to ask), when the posting has aiAssist on, with applicationId and idempotencyKey. It never scores, ranks or decides; people make every decision. Administrators and the hiring manager only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_applications_summarize","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.applications.summarize"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.interviews.save":{"post":{"summary":"Add an interview to an application, or update one with id and expectedRevision: title, scheduledAt, durationMinutes, location (a room or a video link), interviewerUserIds, notes, and status (scheduled, completed, cancelled). No calendar invitation is sent. Interviewers on the panel are added to the application.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_interviews_save","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.interviews.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"interview":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"durationMinutes":{"type":"integer","minimum":5,"maximum":600},"location":{"type":"string","maxLength":500},"interviewerUserIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notes":{"type":"string","maxLength":5000},"status":{"type":"string","enum":["scheduled","completed","cancelled"]}},"required":["title","scheduledAt","durationMinutes","location","interviewerUserIds","notes"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","interview"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.interviews.mine":{"post":{"summary":"The candidates you're assigned to interview: their posting and stage, your upcoming interviews, and whether you've submitted a scorecard.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_interviews_mine","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.interviews.mine"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"The candidates you're assigned to interview: their posting and stage, your upcoming interviews, and whether you've submitted a scorecard.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"recruiting_interviews_mine_get","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.interviews.mine"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/recruiting.scorecards.submit":{"post":{"summary":"Submit or update your scorecard for an application (optionally for one interview): recommendation (strong_no, no, yes, strong_yes), ratings (label and score 1 to 4), summary, and idempotencyKey. Administrators, the hiring manager and assigned interviewers can submit.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_scorecards_submit","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.scorecards.submit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"interviewId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recommendation":{"type":"string","enum":["strong_no","no","yes","strong_yes"]},"ratings":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"score":{"type":"integer","minimum":1,"maximum":4}},"required":["label","score"],"additionalProperties":false}},"summary":{"default":"","type":"string","maxLength":5000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","recommendation"],"additionalProperties":false}}}}}},"/api/v1/accounting/recruiting.notes.add":{"post":{"summary":"Add a note to an application's timeline with applicationId, body and idempotencyKey. Everyone who can see the application can read it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"recruiting_notes_add","tags":["recruiting"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/recruiting.notes.add"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"applicationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string","minLength":1,"maxLength":5000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["applicationId","body"],"additionalProperties":false}}}}}},"/api/v1/accounting/insights.finance.get":{"post":{"summary":"Read gross income, expenses, refunds, profit or loss and category totals per currency for an accounting period, with reviewed and unresolved coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_finance_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.finance.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Read gross income, expenses, refunds, profit or loss and category totals per currency for an accounting period, with reviewed and unresolved coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_finance_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.finance.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.finance.trends":{"post":{"summary":"Read up to 24 months of ledger income, expenses, profit or loss, net burn proxy and top vendors per currency, with period and review coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_finance_trends","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.finance.trends"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Read up to 24 months of ledger income, expenses, profit or loss, net burn proxy and top vendors per currency, with period and review coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_finance_trends_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.finance.trends"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.people.get":{"post":{"summary":"Read all-time contractor cost, payments, hours and timesheet punctuality for one currency, with source coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_people_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.people.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Read all-time contractor cost, payments, hours and timesheet punctuality for one currency, with source coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_people_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.people.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.projects.get":{"post":{"summary":"Read project-tag income and spending per currency for an accounting period, including deduplicated totals and overlapping tags.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_projects_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.projects.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}}}}},"get":{"summary":"Read project-tag income and spending per currency for an accounting period, including deduplicated totals and overlapping tags.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_projects_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.projects.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.tax.get":{"post":{"summary":"Read summarized corporate or GST/HST tax workpaper readiness, issue counts and CAD lines for a period, without company details or transaction rows. This is a draft, not a filed return.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_tax_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.tax.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}}}},"get":{"summary":"Read summarized corporate or GST/HST tax workpaper readiness, issue counts and CAD lines for a period, without company details or transaction rows. This is a draft, not a filed return.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_tax_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.tax.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["corporate","gst_hst"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.forecast.get":{"post":{"summary":"Read a 12-month finance projection for one currency from reviewed ledger history, with recurring item labels, seasonal assumptions and indicative ranges. No books are changed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_forecast_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.forecast.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["currency"],"additionalProperties":false}}}}},"get":{"summary":"Read a 12-month finance projection for one currency from reviewed ledger history, with recurring item labels, seasonal assumptions and indicative ranges. No books are changed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_forecast_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.forecast.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.map.get":{"post":{"summary":"Read a bounded geographic map of transactions, trips, saved hotel groups and saved event venues. Filter by layers, dates, transaction types, currency, search, explicit country/region/city, bounds and zoom; group by saved city/region or geographic grids. Counts include missing-location coverage, and transaction values stay separate by currency. Only locations and sources the actor can read are included; no geocoding or model calls.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]}},"additionalProperties":false}}}}},"get":{"summary":"Read a bounded geographic map of transactions, trips, saved hotel groups and saved event venues. Filter by layers, dates, transaction types, currency, search, explicit country/region/city, bounds and zoom; group by saved city/region or geographic grids. Counts include missing-location coverage, and transaction values stay separate by currency. Only locations and sources the actor can read are included; no geocoding or model calls.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"layers","in":"query","required":false,"schema":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"entryTypes","in":"query","required":false,"schema":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}}},{"name":"country","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"region","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"city","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"bounds","in":"query","required":false,"schema":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false}},{"name":"zoom","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":22}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","enum":["auto","region","city","grid"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.map.drilldown":{"post":{"summary":"Inspect up to 100 map records with the same filters, an optional returned clusterKey and an opaque nextCursor. Logical records and stable cursor paging preserve source access and missing-location coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_drilldown","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.drilldown"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]},"clusterKey":{"type":"string","maxLength":100,"pattern":"^(?:grid:\\d+(?:\\.\\d+)?:\\d+:\\d+|(?:city|region):[a-f0-9]{64})$"},"cursor":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,300}$"},"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"Inspect up to 100 map records with the same filters, an optional returned clusterKey and an opaque nextCursor. Logical records and stable cursor paging preserve source access and missing-location coverage.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_drilldown_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.drilldown"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"layers","in":"query","required":false,"schema":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"entryTypes","in":"query","required":false,"schema":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}}},{"name":"country","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"region","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"city","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"bounds","in":"query","required":false,"schema":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false}},{"name":"zoom","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":22}},{"name":"groupBy","in":"query","required":false,"schema":{"type":"string","enum":["auto","region","city","grid"]}},{"name":"clusterKey","in":"query","required":false,"schema":{"type":"string","maxLength":100,"pattern":"^(?:grid:\\d+(?:\\.\\d+)?:\\d+:\\d+|(?:city|region):[a-f0-9]{64})$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,300}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.map.view":{"post":{"summary":"Create a safe local Insights Map URL from canonical filters and renderer center/selection. No financial records or saved locations change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_view","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.view"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filters":{"type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]}},"additionalProperties":false},"renderer":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"selected":{"type":"string","maxLength":100,"pattern":"^(?:grid:\\d+(?:\\.\\d+)?:\\d+:\\d+|(?:city|region):[a-f0-9]{64})$"}},"additionalProperties":false}},"required":["filters","renderer"],"additionalProperties":false}}}}},"get":{"summary":"Create a safe local Insights Map URL from canonical filters and renderer center/selection. No financial records or saved locations change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_view_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.view"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"filters","in":"query","required":true,"schema":{"type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]}},"additionalProperties":false}},{"name":"renderer","in":"query","required":true,"schema":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"selected":{"type":"string","maxLength":100,"pattern":"^(?:grid:\\d+(?:\\.\\d+)?:\\d+:\\d+|(?:city|region):[a-f0-9]{64})$"}},"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.map.config.get":{"post":{"summary":"Read availability of the interactive Google map and image export, plus its public referrer-restricted browser key. Private provider keys are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_config_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.config.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read availability of the interactive Google map and image export, plus its public referrer-restricted browser key. Private provider keys are never returned.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_config_get_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.config.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/insights.map.export":{"post":{"summary":"Generate a private PNG of the permitted Insights Map filters and supplied viewport, with native map attribution. Return a short-lived private download URL; no accounting records change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_export","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filters":{"type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]}},"additionalProperties":false},"viewport":{"type":"object","properties":{"center":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false}},"required":["center","zoom"],"additionalProperties":false},"width":{"anyOf":[{"type":"number","const":640},{"type":"number","const":1280}]},"height":{"anyOf":[{"type":"number","const":360},{"type":"number","const":720}]}},"required":["filters","viewport"],"additionalProperties":false}}}}},"get":{"summary":"Generate a private PNG of the permitted Insights Map filters and supplied viewport, with native map attribution. Return a short-lived private download URL; no accounting records change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"insights_map_export_get","tags":["insights"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/insights.map.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"filters","in":"query","required":true,"schema":{"type":"object","properties":{"layers":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["transactions","trips","stays","events","other"]}},"query":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"entryTypes":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee","suspense"]}},"country":{"type":"string","minLength":1,"maxLength":120},"region":{"type":"string","minLength":1,"maxLength":120},"city":{"type":"string","minLength":1,"maxLength":120},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"groupBy":{"type":"string","enum":["auto","region","city","grid"]}},"additionalProperties":false}},{"name":"viewport","in":"query","required":true,"schema":{"type":"object","properties":{"center":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},"zoom":{"type":"number","minimum":0,"maximum":22},"bounds":{"type":"object","properties":{"south":{"type":"number","minimum":-90,"maximum":90},"north":{"type":"number","minimum":-90,"maximum":90},"west":{"type":"number","minimum":-180,"maximum":180},"east":{"type":"number","minimum":-180,"maximum":180}},"required":["south","north","west","east"],"additionalProperties":false}},"required":["center","zoom"],"additionalProperties":false}},{"name":"width","in":"query","required":false,"schema":{"anyOf":[{"type":"number","const":640},{"type":"number","const":1280}]}},{"name":"height","in":"query","required":false,"schema":{"anyOf":[{"type":"number","const":360},{"type":"number","const":720}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/merchants.list":{"post":{"summary":"List the merchants the organization paid, with what Oatmilk knows about each (description, industry, website, kind), spend per currency net of refunds over the last 12 months or from/to dates, last paid date, category with its source (rule, history or confirmed) and whether it needs a look. Names written differently, such as \"Slack Technologies, LLC\" and \"SLACK.COM\", are one merchant. Filter with search or filter=needs_look. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_list","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"search":{"type":"string","maxLength":200},"filter":{"default":"all","type":"string","enum":["all","needs_look"]},"sort":{"default":"spend","type":"string","enum":["spend","name","recent"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List the merchants the organization paid, with what Oatmilk knows about each (description, industry, website, kind), spend per currency net of refunds over the last 12 months or from/to dates, last paid date, category with its source (rule, history or confirmed) and whether it needs a look. Names written differently, such as \"Slack Technologies, LLC\" and \"SLACK.COM\", are one merchant. Filter with search or filter=needs_look. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_list_get","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"filter","in":"query","required":false,"schema":{"default":"all","type":"string","enum":["all","needs_look"]}},{"name":"sort","in":"query","required":false,"schema":{"default":"spend","type":"string","enum":["spend","name","recent"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/merchants.get":{"post":{"summary":"Read one merchant by its key: the profile, monthly spend per currency, the five latest transactions, the web pages the profile was read from, and any category suggestion waiting for review. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_get","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["key"],"additionalProperties":false}}}}},"get":{"summary":"Read one merchant by its key: the profile, monthly spend per currency, the five latest transactions, the web pages the profile was read from, and any category suggestion waiting for review. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_get_get","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/merchants.confirm":{"post":{"summary":"Confirm what Oatmilk filled in for a merchant, optionally correcting displayName, websiteDomain, description, industry or kind in edits. Confirmed and corrected fields belong to the person and are never overwritten by a later lookup. Needs the merchant key and an idempotency key; pass expectedRevision from merchants.get to detect changes.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"merchants_confirm","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"edits":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":200},"websiteDomain":{"type":"string","maxLength":253,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"},"description":{"type":"string","minLength":1,"maxLength":240},"industry":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["unknown","business","person","government","financial"]}},"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["key"],"additionalProperties":false}}}}}},"/api/v1/accounting/merchants.enrich":{"post":{"summary":"Look a merchant up on the web and fill in its profile: what it is, its website and industry, each backed by a quote from a page. Pass key for one merchant, or leave it out to look up the next businesses that were never looked up, up to the organization's limit. Runs in the background and returns a run id. Only the merchant's name is sent to the search; never amounts or who paid. Category changes are suggestions for a person to approve.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"merchants_enrich","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.enrich"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"force":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/merchants.settings.get":{"post":{"summary":"Read whether new merchants are looked up automatically and how many web searches one run may use.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_settings_get","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read whether new merchants are looked up automatically and how many web searches one run may use.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"merchants_settings_get_get","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/merchants.settings.update":{"post":{"summary":"Turn automatic merchant lookups on or off and set the most web searches one run may use (1 to 25). Needs the current revision after the first save. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"merchants_settings_update","tags":["merchants"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/merchants.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enrichmentEnabled":{"type":"boolean"},"perRunCap":{"type":"integer","minimum":1,"maximum":25},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/subscriptions.list":{"post":{"summary":"List software subscription candidates from reviewed ledger charges, saved finance corrections, evidence-backed quantities, actual paid totals by calendar year and annualized estimates. Plans a person merged are combined within one currency, and possible duplicate plans are listed with the classifier's and the second opinion's views. A possibly stopped charge is not proof of cancellation.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"subscriptions_list","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List software subscription candidates from reviewed ledger charges, saved finance corrections, evidence-backed quantities, actual paid totals by calendar year and annualized estimates. Plans a person merged are combined within one currency, and possible duplicate plans are listed with the classifier's and the second opinion's views. A possibly stopped charge is not proof of cancellation.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"subscriptions_list_get","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/subscriptions.suggest":{"post":{"summary":"On demand, use the Classifier over the dates and amounts of up to 32 software purchase patterns to suggest recurring or one-off, without sending merchant names or receipt contents to the model. Returns uncertainty and coverage; no records change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"subscriptions_suggest","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"On demand, use the Classifier over the dates and amounts of up to 32 software purchase patterns to suggest recurring or one-off, without sending merchant names or receipt contents to the model. Returns uncertainty and coverage; no records change.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"subscriptions_suggest_get","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.suggest"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/subscriptions.save":{"post":{"summary":"Confirm or correct one subscription's cadence, status, renewal, amount or explicitly evidenced seat or usage quantity. Requires expectedRevision and idempotencyKey. Does not change accounting entries or cancel a provider subscription.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"subscriptions_save","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"vendorKey":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9 ]+$"},"merchant":{"type":"string","minLength":1,"maxLength":160},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"cadence":{"anyOf":[{"type":"string","enum":["monthly","quarterly","yearly","unknown"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["active","paused","ended"]},{"type":"null"}]},"renewalOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"amountMinor":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"quantityCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000000},{"type":"null"}]},"quantityUnit":{"anyOf":[{"type":"string","enum":["seat","user","license","token","credit"]},{"type":"null"}]},"note":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["vendorKey","merchant","currency","expectedRevision","cadence","status","renewalOn","amountMinor","quantityCount","quantityUnit","note"],"additionalProperties":false}}}}}},"/api/v1/accounting/subscriptions.duplicates.check":{"post":{"summary":"On demand, find plans billed by the same vendor in one currency: name rules first, then the Classifier over every plan's normalized merchant descriptor, dates and amounts, then a second opinion on uncertain groups. Never sends raw names, payee names, receipts, accounts or notes. Saves suggestions only; nothing is merged.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"subscriptions_duplicates_check","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.duplicates.check"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/subscriptions.merges.decide":{"post":{"summary":"Merge suggested duplicate plans, or keep them separate so they are not suggested again, for one group or many at once. Requires each group's expectedRevision and an idempotencyKey. Changes no accounting entries and can be undone.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"subscriptions_merges_decide","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.merges.decide"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["merge","dismiss"]},"groups":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"memberKeys":{"minItems":2,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9 ]+$"}},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","currency","memberKeys","expectedRevision"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["decision","groups"],"additionalProperties":false}}}}}},"/api/v1/accounting/subscriptions.merges.undo":{"post":{"summary":"Undo the last decision on one merge group: a merge returns to a suggestion (or, when made by hand, the plans stay separate), and plans kept separate return to a suggestion. Requires expectedRevision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"subscriptions_merges_undo","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.merges.undo"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/subscriptions.merges.create":{"post":{"summary":"Merge two or more plans in the same currency by hand, combining their history and yearly estimate into one plan. Requires an idempotencyKey. Changes no accounting entries and can be undone.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"subscriptions_merges_create","tags":["subscriptions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/subscriptions.merges.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"vendorKeys":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9 ]+$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["currency","vendorKeys"],"additionalProperties":false}}}}}},"/api/v1/accounting/budgets.get":{"post":{"summary":"Read one saved spending budget by ID, including an inactive plan. Returns null when unavailable in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one saved spending budget by ID, including an inactive plan. Returns null when unavailable in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_get_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/budgets.obligations.get":{"post":{"summary":"Read one saved payment plan by ID, including an inactive plan, or the current compliance funding plan by compliance:<item ID>. Returns null when unavailable in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_obligations_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.obligations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^compliance:[0-9a-f-]{36}$"}]}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one saved payment plan by ID, including an inactive plan, or the current compliance funding plan by compliance:<item ID>. Returns null when unavailable in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_obligations_get_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.obligations.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^compliance:[0-9a-f-]{36}$"}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/budgets.accounts.get":{"post":{"summary":"Read one bank account's saved reserve designation and revision. Returns null when no designation exists in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_accounts_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.accounts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accountId"],"additionalProperties":false}}}}},"get":{"summary":"Read one bank account's saved reserve designation and revision. Returns null when no designation exists in this company.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_accounts_get_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.accounts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"accountId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/budgets.overview":{"post":{"summary":"Read spending budgets, reviewed actuals, upcoming tax and accountant obligations, reserve coverage, and future recurring purchase forecasts. Use sections to load only due, spending, reserves or recurring; omitted sections return empty arrays and recurringForecast null. No sections returns all. Recurring forecasts reuse reviewed charges, saved subscription status and accepted same-currency merges, with evidence, amount basis, uncertainty and per-currency totals. They are speculative future costs, kept separate from actual spend, tax liabilities and funding obligations. Reuses official compliance dates and reviewed GST/HST workpapers. Unknown tax amounts and stale or missing balances remain unknown; each reserve is counted once.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_overview","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"sections":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["due","spending","reserves","recurring"]}}},"additionalProperties":false}}}}},"get":{"summary":"Read spending budgets, reviewed actuals, upcoming tax and accountant obligations, reserve coverage, and future recurring purchase forecasts. Use sections to load only due, spending, reserves or recurring; omitted sections return empty arrays and recurringForecast null. No sections returns all. Recurring forecasts reuse reviewed charges, saved subscription status and accepted same-currency merges, with evidence, amount basis, uncertainty and per-currency totals. They are speculative future costs, kept separate from actual spend, tax liabilities and funding obligations. Reuses official compliance dates and reviewed GST/HST workpapers. Unknown tax amounts and stale or missing balances remain unknown; each reserve is counted once.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"budgets_overview_get","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"sections","in":"query","required":false,"schema":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["due","spending","reserves","recurring"]}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/budgets.save":{"post":{"summary":"Create or edit a monthly, quarterly or yearly spending budget, for all expenses or one category. Actuals use ledger entries and splits, with refunds deducted and transfers excluded. Requires current expectedRevision or zero for a new budget and an idempotencyKey. Does not change bookkeeping entries.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"budgets_save","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":160},"categoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amountMinor":{"type":"string","pattern":"^\\d{1,15}$"},"period":{"type":"string","enum":["monthly","quarterly","yearly"]},"startsOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endsOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["expectedRevision","name","categoryId","currency","amountMinor","period","startsOn","endsOn","active"],"additionalProperties":false}}}}}},"/api/v1/accounting/budgets.obligations.save":{"post":{"summary":"Create or edit a tax, GST/HST, accountant or other payment plan, keeping filing and payment dates separate and distinguishing an estimate from a confirmed amount. A negative amount is an expected refund and never offsets another obligation. Recording paidMinor is a planning note, not a bank payment or filed return. Link a complianceItemId to replace its automatic funding plan.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"budgets_obligations_save","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.obligations.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":160},"kind":{"type":"string","enum":["gst_hst","income_tax","accountant","other"]},"amountMinor":{"anyOf":[{"type":"string","pattern":"^-?\\d{1,15}$"},{"type":"null"}]},"amountBasis":{"type":"string","enum":["estimate","confirmed"]},"paidMinor":{"type":"string","pattern":"^\\d{1,15}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"periodFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"periodTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"filingDueOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"paymentDueOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reminderDays":{"type":"integer","minimum":0,"maximum":365},"note":{"type":"string","maxLength":2000},"active":{"type":"boolean"},"complianceItemId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["expectedRevision","name","kind","amountMinor","amountBasis","paidMinor","currency","periodFrom","periodTo","filingDueOn","paymentDueOn","accountId","reminderDays","note","active"],"additionalProperties":false}}}}}},"/api/v1/accounting/budgets.accounts.designate":{"post":{"summary":"Designate a bank account for operating cash, GST/HST, income tax, accountant fees or another reserve, optionally capping the reserved amount. The account must belong to this company. Requires its purposeRevision as expectedRevision, or zero when no designation exists. Does not move funds, change a Wise account or make a payment.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"budgets_accounts_designate","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.accounts.designate"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"purpose":{"type":"string","enum":["operating","gst_hst","income_tax","accountant","other"]},"reserveLimitMinor":{"anyOf":[{"type":"string","pattern":"^\\d{1,15}$"},{"type":"null"}]},"note":{"type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["accountId","expectedRevision","purpose","reserveLimitMinor","note"],"additionalProperties":false}}}}}},"/api/v1/accounting/budgets.evaluate":{"post":{"summary":"Refresh deterministic budget and filing funding checks, adding or resolving funding warnings in the existing Checklist. Existing reminder settings control scheduled emails. Does not file returns, pay tax or move funds. Requires an idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"budgets_evaluate","tags":["budgets"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/budgets.evaluate"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.requests.list":{"post":{"summary":"List what the accountant asked for as a checklist. Each item has a status (open, ready or sent), a link to where Oatmilk fulfils it, and whether Oatmilk already holds the answer (statements, personally paid expenses, payroll answer, accounting access). Also returns the one year-end question when the accountant names a year-end that differs from the company's. Input { from?, to? } picks the period whose facts decide what is ready.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_requests_list","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.requests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false}}}}},"get":{"summary":"List what the accountant asked for as a checklist. Each item has a status (open, ready or sent), a link to where Oatmilk fulfils it, and whether Oatmilk already holds the answer (statements, personally paid expenses, payroll answer, accounting access). Also returns the one year-end question when the accountant names a year-end that differs from the company's. Input { from?, to? } picks the period whose facts decide what is ready.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_requests_list_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.requests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.requests.extract":{"post":{"summary":"Turn the text of an accountant's email into checklist items with a strict-schema AI extraction. The text is untrusted: instructions inside it are ignored, no tools run, only the accountant's short quotes are kept, and nothing is sent or changed besides the new checklist. Input { text, receivedOn?, from?, to?, idempotencyKey }.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_requests_extract","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.requests.extract"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":20,"maxLength":30000},"receivedOn":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["text"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.requests.add":{"post":{"summary":"Add one item to the accountant's checklist by hand, to a new request or to an existing one (requestId). Input { requestId?, kind, title, detail?, idempotencyKey }.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_requests_add","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.requests.add"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["bank_statements","card_statements","personal_expenses","payroll","accounting_software","general_ledger","contractor_payments","prize_payments","sales_tax","shareholder_loans","capital_assets","prior_returns","other"]},"title":{"type":"string","minLength":2,"maxLength":200},"detail":{"default":"","type":"string","maxLength":600},"from":{"type":"string"},"to":{"type":"string"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["kind","title"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.requests.update":{"post":{"summary":"Change a checklist item ({ op: item, itemId, expectedRevision, status?: open|ready|sent|dismissed, note?, evidenceIds? }) or record how the year-end question was answered ({ op: year_end, requestId, expectedRevision, resolution: kept|changed }). Changing the company's year-end itself uses company.update.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_requests_update","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.requests.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"item"},"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["open","ready","sent","dismissed"]},"note":{"type":"string","maxLength":1000},"evidenceIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","itemId","expectedRevision","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"year_end"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolution":{"type":"string","enum":["kept","changed"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","requestId","expectedRevision","resolution","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/tax.statements.overview":{"post":{"summary":"Read every bank, card and payment account's statement bundle for a period { period }: opening and closing balance as of the period end, transaction counts and totals, the original statement files kept, and a plain-words completeness check per account (no statements, a late start, an early end, a missing month, or balances that don't agree with the imported lines). Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_statements_overview","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.statements.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}},"get":{"summary":"Read every bank, card and payment account's statement bundle for a period { period }: opening and closing balance as of the period end, transaction counts and totals, the original statement files kept, and a plain-words completeness check per account (no statements, a late start, an early end, a missing month, or balances that don't agree with the imported lines). Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_statements_overview_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.statements.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":true,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.statements.pack":{"post":{"summary":"Build the statements pack for { period }: one folder per account with its balances, a CSV and a PDF transaction listing for the period, and the original statement files kept for it, plus an index and a completeness summary. Returns a short-lived download. Each request builds a fresh pack and is audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_statements_pack","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.statements.pack"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.statements.acknowledge":{"post":{"summary":"Tell the accountant that an account's statement gap is known and nothing more can be done ({ period, accountId, acknowledged, note (required, plain words such as 'The card wasn't used this year'), expectedRevision (0 when new), idempotencyKey }). The account stops counting as needing attention, the gap stays listed for the accountant with the note, and the answer is audited. acknowledged false withdraws it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_statements_acknowledge","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.statements.acknowledge"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"acknowledged":{"type":"boolean"},"note":{"default":"","type":"string","maxLength":500},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","accountId","acknowledged","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/statements.list":{"post":{"summary":"List the original statement files Oatmilk keeps (uploaded PDF and photo statements, Wise's own monthly statement PDFs, and CSV exports), each with its account, bank, last four digits, period, balances and status: queued, reading, imported (with how many lines were new and how many were already in the books), review (with its plain reason and reasonCode; a statement waiting on its account also has suggestedAccountId, the likeliest existing account, and newAccount, an account drafted from the statement with name, provider, currency, lastFour and accountType, when its number isn't saved on any account; reasonCode ACCOUNT_NEW means no account Oatmilk has could be it), duplicate (of which statement), kept or failed. Also says, for every account and month, whether a statement covers the whole month (statement), part of it (partial), only lines synced from Wise (feed), nothing (missing) or a time before the account's first activity (before). Each file also says whether a PDF can be downloaded (pdf: original, or rendered by Oatmilk from Wise's statement data, a CSV or a photo), how its lines were read (readWith: vision, or text for a reading from the PDF's text layer made before vision), the reader's own warnings, a person's mark (flagged with a note, or checked) and checks: why it waits for a person (review, failed, flagged, old_reader, unsure). Wise sync data is listed once per account and window (the newest copy). Filter with from and to (up to 36 months; the last 12 when left out), or allPeriods: true to find files across the entire saved history, accountId or accountIds (up to 50), includeCoverage: false for only the file list without account-month coverage (coverageIncluded: false and empty month grids; omitted or true retains full coverage), bank, status (or attention for review and failed, or check for every file that waits for a person; toCheck counts them), search, limit and offset. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_list","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountIds":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"string","maxLength":1850}]},"bank":{"type":"string","minLength":1,"maxLength":60},"status":{"type":"string","enum":["queued","reading","imported","review","duplicate","kept","failed","attention","check"]},"search":{"type":"string","maxLength":200},"allPeriods":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"includeCoverage":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List the original statement files Oatmilk keeps (uploaded PDF and photo statements, Wise's own monthly statement PDFs, and CSV exports), each with its account, bank, last four digits, period, balances and status: queued, reading, imported (with how many lines were new and how many were already in the books), review (with its plain reason and reasonCode; a statement waiting on its account also has suggestedAccountId, the likeliest existing account, and newAccount, an account drafted from the statement with name, provider, currency, lastFour and accountType, when its number isn't saved on any account; reasonCode ACCOUNT_NEW means no account Oatmilk has could be it), duplicate (of which statement), kept or failed. Also says, for every account and month, whether a statement covers the whole month (statement), part of it (partial), only lines synced from Wise (feed), nothing (missing) or a time before the account's first activity (before). Each file also says whether a PDF can be downloaded (pdf: original, or rendered by Oatmilk from Wise's statement data, a CSV or a photo), how its lines were read (readWith: vision, or text for a reading from the PDF's text layer made before vision), the reader's own warnings, a person's mark (flagged with a note, or checked) and checks: why it waits for a person (review, failed, flagged, old_reader, unsure). Wise sync data is listed once per account and window (the newest copy). Filter with from and to (up to 36 months; the last 12 when left out), or allPeriods: true to find files across the entire saved history, accountId or accountIds (up to 50), includeCoverage: false for only the file list without account-month coverage (coverageIncluded: false and empty month grids; omitted or true retains full coverage), bank, status (or attention for review and failed, or check for every file that waits for a person; toCheck counts them), search, limit and offset. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_list_get","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"accountIds","in":"query","required":false,"schema":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"string","maxLength":1850}]}},{"name":"bank","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":60}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","reading","imported","review","duplicate","kept","failed","attention","check"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"allPeriods","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"includeCoverage","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/statements.lines":{"post":{"summary":"Read statement lines. With id: the lines Oatmilk read from that statement file, whether they were checked against its period and its opening and closing balances (verified), whether they are in the books (booked), and the reason when they were not. With accountId, from and to (up to 400 days): the account's lines in the books for those dates, each with the id of a checked statement that covers its date (verifiedBy, or null), and the statement files of that period. Amounts are signed integer strings in minor units of the account's currency; money out is negative. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_lines","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.lines"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"Read statement lines. With id: the lines Oatmilk read from that statement file, whether they were checked against its period and its opening and closing balances (verified), whether they are in the books (booked), and the reason when they were not. With accountId, from and to (up to 400 days): the account's lines in the books for those dates, each with the id of a checked statement that covers its date (verifiedBy, or null), and the statement files of that period. Amounts are signed integer strings in minor units of the account's currency; money out is negative. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_lines_get","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.lines"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/statements.download":{"post":{"summary":"Get a short-lived private link to a statement file by id. format original (the default): the unchanged original, an uploaded or Wise statement PDF or photo (pass inline: true to open it in the browser) or a CSV or Wise sync export. format pdf: a PDF of it, the original when it is one, otherwise a PDF Oatmilk renders from Wise's statement data, the CSV's lines or the photo, labelled as prepared by Oatmilk and kept for later downloads. Only statement files can be opened this way. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_download","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inline":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"format":{"default":"original","type":"string","enum":["original","pdf"]}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived private link to a statement file by id. format original (the default): the unchanged original, an uploaded or Wise statement PDF or photo (pass inline: true to open it in the browser) or a CSV or Wise sync export. format pdf: a PDF of it, the original when it is one, otherwise a PDF Oatmilk renders from Wise's statement data, the CSV's lines or the photo, labelled as prepared by Oatmilk and kept for later downloads. Only statement files can be opened this way. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"statements_download_get","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"inline","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"format","in":"query","required":false,"schema":{"default":"original","type":"string","enum":["original","pdf"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/statements.review":{"post":{"summary":"Decide what happens to uploaded statements, with idempotencyKey, decision and either id with expectedRevision or items (up to 100 of { id, expectedRevision }). assign (with accountId) checks the saved reading again for that account without reading the file, and with remember: true also saves the statement's account number and cardholders' cards on that account (never one already on another account) and checks the other statements waiting on it again; new_account (administrators only, with the accounting:admin scope for API keys) adds the account the statement is for once, from the first statement's newAccount with any of name, provider, currency, lastFour and accountType in newAccount overriding it, saves its last four digits so later statements match it, assigns every named statement to it, checks every other statement waiting on that account again, and answers with the account and how many statements it is checking (rechecking); read_again reads the file again (model: zai/glm-5.3-flash by default, or openai/gpt-6-luna, google/gemini-3.8-flash or openai/gpt-6.1-sol) and reads the account number, each cardholder's card and every line afresh; an imported statement keeps its account; keep keeps a statement that needs review as the original without importing its lines; flag (with an optional note) puts it in front of a person; unflag removes the flag; confirm records that a person checked it was read correctly. Nothing is booked unless the lines add up to the statement's balances, and an imported statement's account can't change here. With items, the answer lists each statement changed and each one skipped with why.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"statements_review","tags":["statements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/statements.review"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"decision":{"type":"string","enum":["assign","new_account","read_again","keep","flag","unflag","confirm"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"note":{"type":"string","maxLength":500},"newAccount":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","enum":["rbc","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lastFour":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"accountType":{"type":"string","enum":["bank","credit_card"]}},"additionalProperties":false},"model":{"type":"string","enum":["openai/gpt-6.1-sol","openai/gpt-6-luna","google/gemini-3.8-flash","zai/glm-5.3-flash"]},"remember":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"required":["decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.personalExpenses.get":{"post":{"summary":"The list the accountant asked for: business expenses paid personally in { period }, with date, amount, currency, category, merchant, who paid, receipt link, and whether each was reimbursed by Wise transfer, is still owed or was not claimed, plus totals and whether the company confirmed that none were paid personally.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_personalExpenses_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.personalExpenses.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}},"get":{"summary":"The list the accountant asked for: business expenses paid personally in { period }, with date, amount, currency, category, merchant, who paid, receipt link, and whether each was reimbursed by Wise transfer, is still owed or was not claimed, plus totals and whether the company confirmed that none were paid personally.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_personalExpenses_get_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.personalExpenses.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":true,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.personalExpenses.confirm":{"post":{"summary":"Confirm (confirmed: true) or withdraw (false) 'No business expenses were paid personally' for { period }, with an optional note, the current confirmation revision (0 when none) and an idempotency key. Audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_personalExpenses_confirm","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.personalExpenses.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"confirmed":{"type":"boolean"},"note":{"default":"","type":"string","maxLength":1000},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["period","confirmed","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.personalExpenses.export":{"post":{"summary":"The personally paid expenses for { period } as a CSV for the accountant: { filename, csv }.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_personalExpenses_export","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.personalExpenses.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"required":["period"],"additionalProperties":false}}}}},"get":{"summary":"The personally paid expenses for { period } as a CSV for the accountant: { filename, csv }.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_personalExpenses_export_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.personalExpenses.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":true,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.intercompanyCounterparties.list":{"post":{"summary":"List stable counterparty IDs recorded locally in this organization. A counterparty grants no access to another company's books.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_intercompanyCounterparties_list","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.intercompanyCounterparties.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List stable counterparty IDs recorded locally in this organization. A counterparty grants no access to another company's books.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_intercompanyCounterparties_list_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.intercompanyCounterparties.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.intercompanyCounterparties.create":{"post":{"summary":"Create or reuse a named tenant-local intercompany counterparty with a retry key. Never creates a company, grants access, or writes reciprocal books.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_intercompanyCounterparties_create","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.intercompanyCounterparties.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.intercompanyObligations.list":{"post":{"summary":"Inspect current intercompany advance IDs, revisions, allocated amounts and remaining CAD balances, optionally for one tenant-local counterparty. Retains committed allocations when later evidence needs review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_intercompanyObligations_list","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.intercompanyObligations.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"counterpartyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"Inspect current intercompany advance IDs, revisions, allocated amounts and remaining CAD balances, optionally for one tenant-local counterparty. Retains committed allocations when later evidence needs review.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_intercompanyObligations_list_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.intercompanyObligations.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"counterpartyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.financialCounterparts.preview":{"post":{"summary":"Preview an explicit incoming or outgoing intercompany advance or repayment against its imported cash movement. Validates current source/review/obligation revisions, counterparties, original evidence, accounting dates, partial repayment allocations and remaining balances. No writes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_financialCounterparts_preview","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"purpose":{"type":"string","enum":["incoming_advance","outgoing_advance","incoming_repayment","outgoing_repayment","due_to_other","due_from_other","due_to_shareholder","due_from_shareholder","common_shares"]},"label":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":10,"maxLength":500},"evidence":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["bank_original","receipt_original","company_original"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["kind","id","sha256"],"additionalProperties":false}},"expectedSupportingSourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"counterpartyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"obligationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"amountMinor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$"}},"required":["obligationId","expectedRevision","amountMinor"],"additionalProperties":false}},"attestations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"owner_attestation"},"statement":{"type":"string","minLength":10,"maxLength":2000},"attestedBy":{"type":"string","minLength":1,"maxLength":100},"attestedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","statement","attestedBy","attestedAt"],"additionalProperties":false}},"instruction":{"type":"string","minLength":10,"maxLength":2000}},"required":["entryId","expectedEntryRevision","expectedRevision","sourceFingerprint","purpose","label","reason","evidence"],"additionalProperties":false}}}}},"get":{"summary":"Preview an explicit incoming or outgoing intercompany advance or repayment against its imported cash movement. Validates current source/review/obligation revisions, counterparties, original evidence, accounting dates, partial repayment allocations and remaining balances. No writes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_financialCounterparts_preview_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"expectedEntryRevision","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"sourceFingerprint","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"purpose","in":"query","required":true,"schema":{"type":"string","enum":["incoming_advance","outgoing_advance","incoming_repayment","outgoing_repayment","due_to_other","due_from_other","due_to_shareholder","due_from_shareholder","common_shares"]}},{"name":"label","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"reason","in":"query","required":true,"schema":{"type":"string","minLength":10,"maxLength":500}},{"name":"evidence","in":"query","required":true,"schema":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["bank_original","receipt_original","company_original"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["kind","id","sha256"],"additionalProperties":false}}},{"name":"expectedSupportingSourceFingerprint","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}},{"name":"counterpartyId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"allocations","in":"query","required":false,"schema":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"obligationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"amountMinor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$"}},"required":["obligationId","expectedRevision","amountMinor"],"additionalProperties":false}}},{"name":"attestations","in":"query","required":false,"schema":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"owner_attestation"},"statement":{"type":"string","minLength":10,"maxLength":2000},"attestedBy":{"type":"string","minLength":1,"maxLength":100},"attestedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","statement","attestedBy","attestedAt"],"additionalProperties":false}}},{"name":"instruction","in":"query","required":false,"schema":{"type":"string","minLength":10,"maxLength":2000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.financialCounterparts.get":{"post":{"summary":"Read an existing CAD transfer's current original bank evidence, full allocation proof and separately reviewed balance-sheet counterpart. Unsupported or changed sources remain unresolved. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_financialCounterparts_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read an existing CAD transfer's current original bank evidence, full allocation proof and separately reviewed balance-sheet counterpart. Unsupported or changed sources remain unresolved. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_financialCounterparts_get_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.financialCounterparts.review":{"post":{"summary":"Classify a supported CAD transfer with an explicit incoming advance, outgoing advance, incoming repayment or outgoing repayment. Uses current source/review/obligation revisions, original evidence, owner attestations, a posting preview and a retry key. Repayments allocate existing obligations and cannot overpay. Atomically saves the separate counterpart, balances and audit without duplicating imported cash or touching other companies. Legacy shareholder and share-capital purposes require dashboard confirmation.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_financialCounterparts_review","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.review"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"purpose":{"type":"string","enum":["incoming_advance","outgoing_advance","incoming_repayment","outgoing_repayment","due_to_other","due_from_other","due_to_shareholder","due_from_shareholder","common_shares"]},"label":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":10,"maxLength":500},"evidence":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["bank_original","receipt_original","company_original"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["kind","id","sha256"],"additionalProperties":false}},"expectedSupportingSourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"counterpartyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"obligationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"amountMinor":{"type":"string","pattern":"^[1-9][0-9]{0,18}$"}},"required":["obligationId","expectedRevision","amountMinor"],"additionalProperties":false}},"attestations":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"owner_attestation"},"statement":{"type":"string","minLength":10,"maxLength":2000},"attestedBy":{"type":"string","minLength":1,"maxLength":100},"attestedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","statement","attestedBy","attestedAt"],"additionalProperties":false}},"instruction":{"type":"string","minLength":10,"maxLength":2000},"confirmed":{"type":"boolean","const":true}},"required":["entryId","expectedEntryRevision","expectedRevision","sourceFingerprint","purpose","label","reason","evidence","confirmed"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.financialCounterparts.clear":{"post":{"summary":"Clear a separate financial counterpart using its current revision, source fingerprint and retry key. Releases versioned repayment allocations. Advances with active repayments cannot be cleared. Preserves imported records, earlier evidence and audit history. Legacy purposes require dashboard confirmation.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_financialCounterparts_clear","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.financialCounterparts.clear"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":10,"maxLength":500}},"required":["entryId","expectedEntryRevision","expectedRevision","sourceFingerprint","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.reports.overview":{"post":{"summary":"Read the reports an accountant asks for at year-end, for { period? (defaults to the newest ended fiscal year) }: the trial balance with debit and credit columns, the balance sheet and income statement (draft, from every record, in CAD, by account and GIFI line), plus GST/HST collected and claimed and money set aside for it, Stripe charges before fees with the fees and payouts, contractors and the T4A slips they likely need, key dates (balance due, GST/HST, T2, T4A) and the company documents on file. Also lists the fiscal years. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_reports_overview","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.reports.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"additionalProperties":false}}}}},"get":{"summary":"Read the reports an accountant asks for at year-end, for { period? (defaults to the newest ended fiscal year) }: the trial balance with debit and credit columns, the balance sheet and income statement (draft, from every record, in CAD, by account and GIFI line), plus GST/HST collected and claimed and money set aside for it, Stripe charges before fees with the fees and payouts, contractors and the T4A slips they likely need, key dates (balance due, GST/HST, T2, T4A) and the company documents on file. Also lists the fiscal years. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_reports_overview_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.reports.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":false,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.reports.download":{"post":{"summary":"Download those reports for { period, format (xlsx default, or pdf) } and either report (everything, financial_statements, trial_balance, balance_sheet, income_statement, general_ledger, gst_hst, stripe, contractors) or reports, a list of the ones a person picked (balance_sheet, income_statement, trial_balance, general_ledger, gst_hst, stripe, contractors), which come as one file. The period can be any fiscal year from tax.reports.overview or any dates up to a year apart. Excel workbooks have one sheet per report with formulas for the totals; everything is the whole workbook. Returns a short-lived download. Each request builds a fresh file and is audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_reports_download","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.reports.download"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"report":{"type":"string","enum":["everything","financial_statements","trial_balance","balance_sheet","income_statement","general_ledger","gst_hst","stripe","contractors"]},"reports":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["balance_sheet","income_statement","trial_balance","general_ledger","gst_hst","stripe","contractors"]}},"format":{"default":"xlsx","type":"string","enum":["xlsx","pdf"]}},"required":["period"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.year.get":{"post":{"summary":"Read everything Stripe for one fiscal year, for { period? (defaults to the newest ended fiscal year) }, by currency: charges at their full amount before Stripe's fee, Stripe's fees (bank charges), refunds, disputes, net, and payouts to the bank, every month of the year, and what still needs a look (payouts not matched to a bank deposit, charges whose GST/HST isn't known, Stripe items not sorted). Also lists the fiscal years. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_year_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.year.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},"additionalProperties":false}}}}},"get":{"summary":"Read everything Stripe for one fiscal year, for { period? (defaults to the newest ended fiscal year) }, by currency: charges at their full amount before Stripe's fee, Stripe's fees (bank charges), refunds, disputes, net, and payouts to the bank, every month of the year, and what still needs a look (payouts not matched to a bank deposit, charges whose GST/HST isn't known, Stripe items not sorted). Also lists the fiscal years. Read-only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_year_get_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.year.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"period","in":"query","required":false,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.year.download":{"post":{"summary":"Download Stripe for one fiscal year, for { period, format (zip default, xlsx or pdf) }. The ZIP holds an Excel workbook (summary, charges with their fee and GST/HST when known, refunds, disputes, fees by month, payouts and whether each is matched to a bank deposit), the same lists as CSV files, and Stripe's original records when they fit (its README says when they were left out). xlsx is the workbook alone and pdf a short summary. Returns a short-lived download. Each request builds a fresh file and is audited with counts only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_year_download","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.year.download"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"format":{"default":"zip","type":"string","enum":["zip","xlsx","pdf"]}},"required":["period"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.filings.get":{"post":{"summary":"Read a return or slips the company files itself, step by step: { kind: gst_hst (a GST/HST period), t4a (contractor T4A and T4A-NR slips for a calendarYear) or t2 (a corporate year), period? or calendarYear? (defaults to the newest one that ended) }. Returns the due dates (with weekend and holiday shifts), each walkthrough step and whether it's done, what was recorded (filed on, CRA confirmation number, paid on and amount, copies given), the matching compliance checklist items, the business number on file, the other periods to choose from and the official sources. The numbers to enter come from tax.prep.overview (GST/HST lines) and contractorOps.taxForms.get (slips). Oatmilk never files or pays anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_filings_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.filings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["gst_hst","t4a","t2"]},"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"calendarYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["kind"],"additionalProperties":false}}}}},"get":{"summary":"Read a return or slips the company files itself, step by step: { kind: gst_hst (a GST/HST period), t4a (contractor T4A and T4A-NR slips for a calendarYear) or t2 (a corporate year), period? or calendarYear? (defaults to the newest one that ended) }. Returns the due dates (with weekend and holiday shifts), each walkthrough step and whether it's done, what was recorded (filed on, CRA confirmation number, paid on and amount, copies given), the matching compliance checklist items, the business number on file, the other periods to choose from and the official sources. The numbers to enter come from tax.prep.overview (GST/HST lines) and contractorOps.taxForms.get (slips). Oatmilk never files or pays anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_filings_get_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.filings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["gst_hst","t4a","t2"]}},{"name":"period","in":"query","required":false,"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false}},{"name":"calendarYear","in":"query","required":false,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.filings.update":{"post":{"summary":"Record progress on a return or slips the company files itself: { kind, periodKey (from tax.filings.get), expectedRevision, idempotencyKey, steps? ({ stepKey: true|false }), filedOn?, confirmation? (the CRA confirmation number), paidOn?, amountPaidMinor?, copiesSentOn?, note? }. Once filed (and paid, or the copies given), the matching compliance checklist items are marked done. It only records what the person did on the CRA's site; nothing is sent to the CRA.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_filings_update","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.filings.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["gst_hst","t4a","t2"]},"periodKey":{"type":"string","minLength":4,"maxLength":21},"expectedRevision":{"type":"integer","minimum":0,"maximum":1000000000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"steps":{"type":"object","propertyNames":{"type":"string","enum":["ready","check","sign_in","enter","pay","who","details","account","fill","send","copies","estimate","gather","shareholders","file","assessment"]},"additionalProperties":{"type":"boolean"}},"filedOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmation":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountPaidMinor":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d{0,14})$"},{"type":"null"}]},"copiesSentOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string","maxLength":2000}},"required":["kind","periodKey","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.shareholders.get":{"post":{"summary":"Read the shareholder register: the classes of shares (common or preferred, voting or not), each shareholder (person, corporation or trust; address; resident in Canada or not) with their holdings (number of shares, class, issue date, certificate, what was paid, end date), directors and officers, shares outstanding by class, each holder's share of the common, preferred and voting shares, the T2 Schedule 50 rows (holders of 10% or more, with the tax number masked), how much of the vote Canadians hold, and names found in company documents that aren't in the register yet. Tax numbers are only ever masked.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_shareholders_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.shareholders.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the shareholder register: the classes of shares (common or preferred, voting or not), each shareholder (person, corporation or trust; address; resident in Canada or not) with their holdings (number of shares, class, issue date, certificate, what was paid, end date), directors and officers, shares outstanding by class, each holder's share of the common, preferred and voting shares, the T2 Schedule 50 rows (holders of 10% or more, with the tax number masked), how much of the vote Canadians hold, and names found in company documents that aren't in the register yet. Tax numbers are only ever masked.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_shareholders_get_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.shareholders.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.shareholders.update":{"post":{"summary":"Replace the shareholder register with { register: { classes, holders, holdings, officers }, expectedRevision, idempotencyKey } (from company.shareholders.get, changed). Ids are 8 to 40 lowercase letters, digits and hyphens; shares are whole numbers; every holding names a holder and class in the register. Removing a shareholder removes their saved tax number. Audited with counts only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"company_shareholders_update","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.shareholders.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"register":{"type":"object","properties":{"classes":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"name":{"type":"string","minLength":1,"maxLength":60},"kind":{"type":"string","enum":["common","preferred"]},"voting":{"default":true,"type":"boolean"},"note":{"default":"","type":"string","maxLength":500}},"required":["id","name","kind"],"additionalProperties":false}},"holders":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"kind":{"default":"person","type":"string","enum":["person","corporation","trust"]},"legalName":{"type":"string","minLength":1,"maxLength":200},"email":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}]},"address":{"default":{"line1":"","line2":"","city":"","region":"","postalCode":"","country":""},"type":"object","properties":{"line1":{"default":"","type":"string","maxLength":120},"line2":{"default":"","type":"string","maxLength":120},"city":{"default":"","type":"string","maxLength":80},"region":{"default":"","type":"string","maxLength":80},"postalCode":{"default":"","type":"string","maxLength":20},"country":{"default":"","type":"string","maxLength":2}},"additionalProperties":false},"residency":{"default":"canada","type":"string","enum":["canada","other"]},"note":{"default":"","type":"string","maxLength":500}},"required":["id","legalName"],"additionalProperties":false}},"holdings":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"holderId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"classId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"shares":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"issuedOn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"certificate":{"default":"","type":"string","maxLength":40},"considerationMinor":{"default":null,"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d{0,14})$"},{"type":"null"}]},"endedOn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"default":"","type":"string","maxLength":500}},"required":["id","holderId","classId","shares"],"additionalProperties":false}},"officers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"name":{"type":"string","minLength":1,"maxLength":200},"roles":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["director","president","secretary","treasurer","officer"]}},"startedOn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"endedOn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"residency":{"default":"canada","type":"string","enum":["canada","other"]}},"required":["id","name","roles"],"additionalProperties":false}}},"required":["classes","holders","holdings","officers"],"additionalProperties":false},"expectedRevision":{"type":"integer","minimum":0,"maximum":1000000000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["register","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.shareholders.taxNumber":{"post":{"summary":"Save or remove a shareholder's tax number for Schedule 50 and T5 slips: { holderId, kind (sin, bn with an optional program account, itn, or foreign with country), value, country? } or value null to remove it. SINs are checked with their check digit. The number is stored encrypted and only ever returned masked; it is never logged or audited.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_shareholders_taxNumber","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.shareholders.taxNumber"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"holderId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{7,39}$"},"kind":{"type":"string","enum":["sin","bn","itn","foreign"]},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["holderId","value"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.shareholders.export":{"post":{"summary":"Download the shareholder register as a spreadsheet with full tax numbers, to file Schedule 50 or T5 slips, with a reason. Only an administrator in the dashboard can; the download is audited with the reason and the number of shareholders, never the numbers. Not available to API keys or MCP clients.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_shareholders_export","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.shareholders.export"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.facts.review":{"post":{"summary":"Read what the company's own records say about the company, for a person to check before anything is saved. Oatmilk reads every company record (articles, certificates, registry and annual returns, CRA business number and GST/HST registration letters) and every CRA tax record that prints a GST/HST (RT) account, and never saves what it found on its own. Input: optional documentIds to look at only those records (for example the files just uploaded); otherwise the newest 50 company and tax records. Returns revision (the company profile's, for company.facts.apply), documents (each record's id, title, filename, kind, createdAt, status: reading, to_check, nothing_new, other_company, unreadable or failed, and details, how many it has to check) and fields: one per profile detail with slot, key (legalName, operatingName, businessNumber, corporationNumber, incorporationDate, jurisdiction, entityCountry, formationJurisdiction, legalForm, usFederalTaxClassification, registration, gstHstAccount, gstHstEffectiveDate, gstHstFrequency, fiscalYearEnd, registeredOffice, directors, officers or shareholders), label, current (what the profile has now, or null), kind (fill when the profile is empty, conflict when it differs) and options (each value with the records that say it; two options mean the records disagree). pending is how many details wait to be checked. A finding a person already checked and left isn't listed again until the record says something new. Show the fields to the person and let them choose before calling company.facts.apply.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_facts_review","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.facts.review"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}}},"get":{"summary":"Read what the company's own records say about the company, for a person to check before anything is saved. Oatmilk reads every company record (articles, certificates, registry and annual returns, CRA business number and GST/HST registration letters) and every CRA tax record that prints a GST/HST (RT) account, and never saves what it found on its own. Input: optional documentIds to look at only those records (for example the files just uploaded); otherwise the newest 50 company and tax records. Returns revision (the company profile's, for company.facts.apply), documents (each record's id, title, filename, kind, createdAt, status: reading, to_check, nothing_new, other_company, unreadable or failed, and details, how many it has to check) and fields: one per profile detail with slot, key (legalName, operatingName, businessNumber, corporationNumber, incorporationDate, jurisdiction, entityCountry, formationJurisdiction, legalForm, usFederalTaxClassification, registration, gstHstAccount, gstHstEffectiveDate, gstHstFrequency, fiscalYearEnd, registeredOffice, directors, officers or shareholders), label, current (what the profile has now, or null), kind (fill when the profile is empty, conflict when it differs) and options (each value with the records that say it; two options mean the records disagree). pending is how many details wait to be checked. A finding a person already checked and left isn't listed again until the record says something new. Show the fields to the person and let them choose before calling company.facts.apply.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_facts_review_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.facts.review"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"documentIds","in":"query","required":false,"schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.facts.apply":{"post":{"summary":"Save the details a person chose from company.facts.review into the company profile, in one change: picks ([{ documentId, key }], one record per detail, from the options shown), checked (the ids of the records whose findings the person saw, so the ones they left aren't asked about again), expectedRevision (the review's revision) and idempotencyKey. Only call it after the person confirmed the values. Each saved detail notes its record as the source. A GST/HST number, registration date or filing frequency also marks the company as registered for GST/HST; a GST/HST number has to start with the business number. A changed profile is refused with CONFLICT: read the review again. Returns the saved profile and revision, applied and checked. Run accounting_compliance_refresh afterwards to rebuild the tax deadlines from the new details.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"company_facts_apply","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.facts.apply"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"picks":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string","enum":["legalName","operatingName","businessNumber","corporationNumber","incorporationDate","jurisdiction","entityCountry","formationJurisdiction","legalForm","usFederalTaxClassification","registration","gstHstAccount","gstHstEffectiveDate","gstHstFrequency","fiscalYearEnd","registeredOffice","directors","officers","shareholders"]}},"required":["documentId","key"],"additionalProperties":false}},"checked":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"expectedRevision":{"type":"integer","minimum":0,"maximum":1000000000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":180}},"required":["picks","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.packages.list":{"post":{"summary":"List the year-end data packages asked for in the last 60 days, newest first: each one's fiscal year, status (queued and building while it's being put together, then ready for seven days, failed or expired), size, what's inside (reports, bank statements, Stripe, company documents, shareholder register, and anything left out), who it was sent to, whether each person's email went out, and every download (through a link or in Oatmilk, and whether the person was signed in). Read-only; the links themselves are only ever in the emails.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_packages_list","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the year-end data packages asked for in the last 60 days, newest first: each one's fiscal year, status (queued and building while it's being put together, then ready for seven days, failed or expired), size, what's inside (reports, bank statements, Stripe, company documents, shareholder register, and anything left out), who it was sent to, whether each person's email went out, and every download (through a link or in Oatmilk, and whether the person was signed in). Read-only; the links themselves are only ever in the emails.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_packages_list_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.packages.request":{"post":{"summary":"Ask for one ZIP of everything an outside accountant needs for a fiscal year: { period? (a corporate year; defaults to the newest ended one), recipients? (up to 10 email addresses besides the person asking), note? (up to 500 characters, shown in the email), idempotencyKey }. It's put together in the background, usually within a few minutes; the person asking and each recipient then get an email with their own download link, which works without signing in for seven days. Each download is audited. Tell the person it's being put together and that the email will come when it's ready; check on it with tax.packages.list.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_packages_request","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.request"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["corporate","gst_hst"]}},"required":["from","to","kind"],"additionalProperties":false},"recipients":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"note":{"default":"","type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.packages.share":{"post":{"summary":"Send a package to more people: { packageId, emails (1 to 10 addresses), idempotencyKey }. Each new person gets their own link by email, at once if the package is ready, otherwise as soon as it is. Someone whose link was turned off gets a new one. A package can go to 25 people at most.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_packages_share","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.share"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"emails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["packageId","emails"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.packages.revoke":{"post":{"summary":"Turn off a package's download links: { packageId, linkId? (one person's link; leave it out to turn off every link), idempotencyKey }. The team can still download the package in Oatmilk until it expires.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_packages_revoke","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.revoke"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"linkId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["packageId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.packages.download":{"post":{"summary":"Download a ready package in Oatmilk: { packageId }. Returns a link that works for five minutes. Each download is audited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_packages_download","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.packages.download"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["packageId"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.prizes.overview":{"post":{"summary":"Prize payouts for a calendar year (default: the latest with payouts): events, winners with masked details and intake link state, confirmed payouts, suggestions detected from outgoing transfers (never applied automatically), the per-winner total against the $500 T4A box 028 threshold with a plain status (under $500, T4A needed, waiting for winner details, ask your accountant), sponsorship invoices shown separately, and the checklist for the CRA RZ account and the filing deadline. Optional eventId includes that active workspace event when opening an older map result, without changing totals or other source counts. No HST applies to prizes. Nothing is sent or filed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prizes_overview","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2200},"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"Prize payouts for a calendar year (default: the latest with payouts): events, winners with masked details and intake link state, confirmed payouts, suggestions detected from outgoing transfers (never applied automatically), the per-winner total against the $500 T4A box 028 threshold with a plain status (under $500, T4A needed, waiting for winner details, ask your accountant), sponsorship invoices shown separately, and the checklist for the CRA RZ account and the filing deadline. Optional eventId includes that active workspace event when opening an older map result, without changing totals or other source counts. No HST applies to prizes. Nothing is sent or filed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prizes_overview_get","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.overview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":2000,"maximum":2200}},{"name":"eventId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/tax.prizes.events.save":{"post":{"summary":"Create or edit a prize event (hackathon, competition, event) with its date, notes and the event or promo documents kept as evidence. Input { id?, expectedRevision, name, kind, heldOn?, notes, evidenceIds?, venue?, archived?, idempotencyKey }. Optional venue { lat, lon, label, address?, city?, region?, countryCode? } adds its location to Insights Map; countryCode is an explicit two-letter uppercase country code. Omit venue to keep it, or set null to remove it. Never infer a venue from an event name.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_prizes_events_save","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.events.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":160},"kind":{"default":"hackathon","type":"string","enum":["hackathon","competition","event","other"]},"heldOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"default":"","type":"string","maxLength":500},"evidenceIds":{"maxItems":30,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"venue":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"label":{"type":"string","minLength":1,"maxLength":200},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"region":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]}},"required":["lat","lon","label"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["expectedRevision","name"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.prizes.payouts.decide":{"post":{"summary":"Decide about one outgoing transfer or record: op record confirms it as a prize (optionally to a winner and event), dismiss says it wasn't a prize, update changes its winner, event, note or returned amount, undo puts it back to a suggestion. Never sends money.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prizes_payouts_decide","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.payouts.decide"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"record"},"bankTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paidOn":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"default":"manual","type":"string","enum":["detected","manual"]},"reasons":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"note":{"default":"","type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","paidOn","currency","amountMinor","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"dismiss"},"bankTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paidOn":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,14}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","paidOn","currency","amountMinor","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"eventId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipientId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"returnedMinor":{"type":"string","pattern":"^\\d{1,15}$"},"returnedOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"type":"string","maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","id","expectedRevision","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"undo"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","id","expectedRevision","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/tax.prizes.recipients.save":{"post":{"summary":"Add a winner (individual or business), edit them, or archive them. With sendLink and an email address Oatmilk emails the winner a private, account-free link for their legal name, SIN or business number and mailing address, before any payment. The email never contains a number.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prizes_recipients_save","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.recipients.save"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"create"},"kind":{"default":"individual","type":"string","enum":["individual","business"]},"displayName":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"sendLink":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","displayName","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["individual","business"]},"displayName":{"type":"string","minLength":1,"maxLength":200},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"sendLink":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","id","expectedRevision","displayName","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"archive"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["op","id","expectedRevision","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/tax.prizes.recipients.link":{"post":{"summary":"Issue a fresh winner details link, send a reminder (at most every 12 hours and six times), or copy the current link ({ recipientId, mode: issue|remind|copy }). Copying and issuing without an email return the private link and work in the signed-in dashboard only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"tax_prizes_recipients_link","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.recipients.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"recipientId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["issue","remind","copy"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["recipientId","mode"],"additionalProperties":false}}}}}},"/api/v1/accounting/tax.prizes.schedule":{"post":{"summary":"The T4A summary schedule for a calendar year { year } as a CSV: winner, legal name, SIN or business number, address, amount, box 028 and payment dates. Numbers are masked. reveal { reason } shows full numbers to an administrator in the dashboard or to the accountant, and is audited with the reason.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"tax_prizes_schedule","tags":["tax"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/tax.prizes.schedule"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"year":{"type":"integer","minimum":2000,"maximum":2200},"reveal":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":500}},"required":["reason"],"additionalProperties":false}},"required":["year"],"additionalProperties":false}}}}}},"/api/v1/accounting/notifications.checklist.list":{"post":{"summary":"List the signed-in member's unseen reminders that a snoozed checklist item returned. Only their own open items in this organization, at most ten from the past 30 days.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_checklist_list","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.checklist.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the signed-in member's unseen reminders that a snoozed checklist item returned. Only their own open items in this organization, at most ten from the past 30 days.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_checklist_list_get","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.checklist.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notifications.checklist.dismiss":{"post":{"summary":"Mark a snooze reminder as seen for the signed-in member only. Requires an itemId and idempotencyKey. Repeated dismissal changes nothing.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notifications_checklist_dismiss","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.checklist.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["itemId"],"additionalProperties":false}}}}}},"/api/v1/accounting/notifications.joins.list":{"post":{"summary":"List the signed-in member's unseen notices that someone joined by an invitation (a contractor, an outside accountant or a team member): who joined, who invited them and a link to the person. Only the member's own notices, from the last 30 days, at most 10.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_joins_list","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.joins.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the signed-in member's unseen notices that someone joined by an invitation (a contractor, an outside accountant or a team member): who joined, who invited them and a link to the person. Only the member's own notices, from the last 30 days, at most 10.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_joins_list_get","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.joins.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notifications.joins.dismiss":{"post":{"summary":"Mark one join notice as seen for the signed-in member only. Requires an idempotencyKey. Dismissing twice, or a notice that isn't theirs, changes nothing.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notifications_joins_dismiss","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.joins.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/notifications.comments.list":{"post":{"summary":"List the signed-in member's unread mentions and replies on organization documents, with a direct link to the comment thread.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_comments_list","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the signed-in member's unread mentions and replies on organization documents, with a direct link to the comment thread.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_comments_list_get","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.comments.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notifications.comments.dismiss":{"post":{"summary":"Mark one of the signed-in member's document comment notifications as read. Requires an idempotencyKey; other members' notifications cannot be changed.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notifications_comments_dismiss","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.comments.dismiss"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/notifications.preferences.get":{"post":{"summary":"Read the signed-in member's choice to get join notices by email and in Oatmilk. Both are on until they turn them off.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_preferences_get","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.preferences.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the signed-in member's choice to get join notices by email and in Oatmilk. Both are on until they turn them off.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"notifications_preferences_get_get","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.preferences.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/notifications.preferences.update":{"post":{"summary":"Turn the signed-in member's join notices on or off, by email and in Oatmilk. Requires an idempotencyKey. It never changes another member's choice.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"notifications_preferences_update","tags":["notifications"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/notifications.preferences.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"joins":{"type":"object","properties":{"email":{"type":"boolean"},"inApp":{"type":"boolean"}},"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["joins"],"additionalProperties":false}}}}}},"/api/v1/accounting/trips.list":{"post":{"summary":"List trips: purchases made while travelling, grouped by stay, with title, place, dates, status (upcoming, active or past), how many transactions belong to each, what it cost per currency (holds left out, hotel credits taken off) and its map centre. Contributors see only trips that include a transaction they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"trips_list","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List trips: purchases made while travelling, grouped by stay, with title, place, dates, status (upcoming, active or past), how many transactions belong to each, what it cost per currency (holds left out, hotel credits taken off) and its map centre. Contributors see only trips that include a transaction they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"trips_list_get","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/trips.get":{"post":{"summary":"Read one trip by id: its summary, every transaction in it with its role (lodging, hold, room_charge, meal, transport or other), confidence and note, and the place pins to draw on a map. Contributors see only their own transactions in it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"trips_get","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one trip by id: its summary, every transaction in it with its role (lodging, hold, room_charge, meal, transport or other), confidence and note, and the place pins to draw on a map. Contributors see only their own transactions in it.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"trips_get_get","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/places.search":{"post":{"summary":"Search for a place or an address by name: pass query (up to 120 characters) and optionally near, the point the results should lean toward, as {lat, lon} or \"lat,lon\". Returns up to five results from OpenStreetMap, each with a label, an address, lat and lon; a person then saves one with entries.place.set. Run it only when a person submits a search, never while they type. Each person gets 30 new lookups an hour, and only the words searched leave Oatmilk.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"places_search","tags":["places"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/places.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":120},"near":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},{"type":"string","pattern":"^-?\\d{1,2}(?:\\.\\d+)?\\s*,\\s*-?\\d{1,3}(?:\\.\\d+)?$"}]}},"required":["query"],"additionalProperties":false}}}}},"get":{"summary":"Search for a place or an address by name: pass query (up to 120 characters) and optionally near, the point the results should lean toward, as {lat, lon} or \"lat,lon\". Returns up to five results from OpenStreetMap, each with a label, an address, lat and lon; a person then saves one with entries.place.set. Run it only when a person submits a search, never while they type. Each person gets 30 new lookups an hour, and only the words searched leave Oatmilk.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"places_search_get","tags":["places"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/places.search"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"near","in":"query","required":false,"schema":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"additionalProperties":false},{"type":"string","pattern":"^-?\\d{1,2}(?:\\.\\d+)?\\s*,\\s*-?\\d{1,3}(?:\\.\\d+)?$"}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/places.settings.get":{"post":{"summary":"Read whether Oatmilk looks for the location of older card purchases in the background: backfill, on by default. It places up to 20 purchases from the last 120 days every five minutes and asks a person only when it cannot tell.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"places_settings_get","tags":["places"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/places.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read whether Oatmilk looks for the location of older card purchases in the background: backfill, on by default. It places up to 20 purchases from the last 120 days every five minutes and asks a person only when it cannot tell.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"places_settings_get_get","tags":["places"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/places.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/places.settings.update":{"post":{"summary":"Turn the background search for the location of older card purchases on or off with backfill (true or false) and an idempotencyKey. Turning it off never removes a place already saved. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"places_settings_update","tags":["places"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/places.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"backfill":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["backfill"],"additionalProperties":false}}}}}},"/api/v1/accounting/trips.create":{"post":{"summary":"Create a trip with title, startDate, optional endDate and placeLabel, and an idempotencyKey. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"trips_create","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"placeLabel":{"type":"string","maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title","startDate"],"additionalProperties":false}}}}}},"/api/v1/accounting/trips.update":{"post":{"summary":"Rename a trip or change its dates or place with id, the fields to change and an idempotencyKey. A trip a person edited is never rewritten by Oatmilk. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"trips_update","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":200},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"placeLabel":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/trips.linkEntry":{"post":{"summary":"Put a transaction in a trip with tripId, entryId, an optional role (lodging, hold, room_charge, meal, transport or other) and an idempotencyKey. A transaction is in one trip at a time; linking it here moves it. Contributors can link only transactions they own.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"trips_linkEntry","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.linkEntry"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tripId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["lodging","hold","room_charge","meal","transport","other"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tripId","entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/trips.unlinkEntry":{"post":{"summary":"Take a transaction out of a trip with tripId, entryId and an idempotencyKey. Oatmilk never puts it back. Contributors can unlink only transactions they own.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"trips_unlinkEntry","tags":["trips"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/trips.unlinkEntry"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tripId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["tripId","entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.context":{"post":{"summary":"Read what Oatmilk knows about where and when a transaction happened, by entryId: the trip it belongs to, its place pin, whether it looks like a hotel hold (with the reason and the date a final charge is expected), and purchases within about a kilometre around the same dates. Contributors can read only transactions they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_context","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.context"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read what Oatmilk knows about where and when a transaction happened, by entryId: the trip it belongs to, its place pin, whether it looks like a hotel hold (with the reason and the date a final charge is expected), and purchases within about a kilometre around the same dates. Contributors can read only transactions they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_context_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.context"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.place.set":{"post":{"summary":"Save where a purchase was made with entryId, lat, lon, a label, an optional address and an idempotencyKey. A place a person set is never replaced by an automatic lookup. Contributors can set only the place of transactions they own.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_place_set","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.place.set"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"label":{"type":"string","minLength":1,"maxLength":200},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"city":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"region":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","lat","lon","label"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.hold.set":{"post":{"summary":"Say whether a card charge is a hotel hold with entryId, state (confirmed_hold or not_a_hold) and an idempotencyKey. Confirming books the charge as a transfer, so it leaves expense totals and tax while staying visible and matched; pass resolvedByEntryId to say which later charge replaced it. Declining puts the purchase back. A person's decision is final: Oatmilk never overturns it. Closed periods can't change. Contributors can decide only transactions they own.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_hold_set","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.hold.set"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["confirmed_hold","not_a_hold"]},"resolvedByEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","state"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigations.run":{"post":{"summary":"Run the receipt investigator now for one transaction or receipt (entryId) with an idempotencyKey: it gathers what Oatmilk knows, asks the investigator for a judgement, links a receipt charged to a hotel room to the hotel's charge, and asks a person one plain question when it can't tell. Returns the run id to follow. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigations_run","tags":["investigations"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigations.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.hold.release.undo":{"post":{"summary":"Undo Oatmilk's pairing of money back on a card with the hotel hold it gave back, by the money back's releaseEntryId with an idempotencyKey. The pair is never made again, a card fee booked with the hold is a fee again, the money back is reviewed again, and a hold it resolved is open again. Finance access required; a closed month blocks it.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_hold_release_undo","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.hold.release.undo"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"releaseEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["releaseEntryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigations.review.run":{"post":{"summary":"Run the second opinion now on one bank line (entryId) with an idempotencyKey: an agent with read-only lookups of the organization's transactions, hotel holds, trips, receipts and memory decides what the line is, pairs money back with the hold it gives back, or writes one specific question. Its answer is checked before Autopilot applies it, and its reasoning is kept in the transaction's activity. Administrators only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigations_review_run","tags":["investigations"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigations.review.run"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/investigations.questions.list":{"post":{"summary":"List the questions Oatmilk asked a person while investigating, newest first, optionally for one entryId or only the open ones. Each has a title, two to four answers, whether a note is allowed, and the answer when given. Contributors see only questions about transactions they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigations_questions_list","tags":["investigations"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigations.questions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"open":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List the questions Oatmilk asked a person while investigating, newest first, optionally for one entryId or only the open ones. Each has a title, two to four answers, whether a note is allowed, and the answer when given. Contributors see only questions about transactions they own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"investigations_questions_list_get","tags":["investigations"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigations.questions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"open","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/investigations.questions.answer":{"post":{"summary":"Answer a question with its id, one of its optionId answers (or none_of_these when the person settled it by hand), an optional note of up to 1000 characters and an idempotencyKey. An offered answer does only what Oatmilk wrote down when it asked (confirm or decline a hold, put a receipt on a hotel's charge or take it off, link a transaction to a trip); none_of_these only closes the question. Every answer is audited, and a question closes once answered. Contributors can answer only questions about transactions they own.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"investigations_questions_answer","tags":["investigations"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/investigations.questions.answer"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"optionId":{"type":"string","minLength":1,"maxLength":40},"note":{"type":"string","maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","optionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.delete.preview":{"post":{"summary":"Before deleting a transaction, read everything tied to it by id: its bank lines (and whether each can be excluded with it), the receipts and company email it came from, a reimbursement claim, its trip, splits, tags and open questions, the default for each choice, and anything that blocks deleting it (a closed period, a Stripe record, the book record of a synced Wise movement, an approved or paid reimbursement). A deleted transaction returns who deleted it, when and why. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_delete_preview","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.delete.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Before deleting a transaction, read everything tied to it by id: its bank lines (and whether each can be excluded with it), the receipts and company email it came from, a reimbursement claim, its trip, splits, tags and open questions, the default for each choice, and anything that blocks deleting it (a closed period, a Stripe record, the book record of a synced Wise movement, an approved or paid reimbursement). A deleted transaction returns who deleted it, when and why. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_delete_preview_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.delete.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.deleted.list":{"post":{"summary":"List deleted transactions, newest first, with limit and offset: merchant, date and amount, who deleted each, when and why, what else changed, and whether it was restored. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_deleted_list","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.deleted.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}}},"get":{"summary":"List deleted transactions, newest first, with limit and offset: merchant, date and amount, who deleted each, when and why, what else changed, and whether it was restored. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_deleted_list_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.deleted.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.delete":{"post":{"summary":"Delete a transaction from the books with id, expectedRevision, reason (3 to 1000 characters), idempotencyKey and optional choices: bankLines keep (default, the line goes back to Reconcile) or exclude (a manual CSV line leaves the books too), receipts dismiss (default, labelled not a transaction) or keep, and email not_transaction (default, the company email is archived as general mail) or keep. A submitted reimbursement claim is withdrawn, the transaction leaves its trip and open questions close. It is voided, never erased: files, history and audit stay, and entries.restore puts it back. Refused when entries.delete.preview lists a blocker. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_delete","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.delete"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"choices":{"default":{},"type":"object","properties":{"bankLines":{"type":"string","enum":["keep","exclude"]},"receipts":{"type":"string","enum":["dismiss","keep"]},"email":{"type":"string","enum":["not_transaction","keep"]}},"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.restore":{"post":{"summary":"Restore a deleted transaction with id, expectedRevision (its revision after deleting), reason and idempotencyKey. Its bank matches, excluded bank lines, receipt labels, the email's folder, a withdrawn claim, its trip and its questions come back when nothing changed since; a bank line matched to something else since is a conflict. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_restore","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.restore"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/team.list":{"post":{"summary":"List the team: everyone in the company's organization with their role and whether they can open Oatmilk, plus pending team invitations. Invitation links are never included.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"team_list","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the team: everyone in the company's organization with their role and whether they can open Oatmilk, plus pending team invitations. Invitation links are never included.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"team_list_get","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/team.invite":{"post":{"summary":"Invite a new team member by email with a role (admin, finance or contributor), an optional message and an idempotency key. Oatmilk emails them a private link when email is enabled; the result always includes a link to share and a delivery status. The link works for 14 days. Only organization administrators can manage the team. MCP calls also require the accounting:admin scope; the direct API cannot send team invitations or remove members.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"team_invite","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.invite"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","finance","contributor"]},"message":{"type":"string","maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["email","role"],"additionalProperties":false}}}}}},"/api/v1/accounting/team.invitations.resend":{"post":{"summary":"Email a pending team invitation again and give it another 14 days, with id, expectedRevision and idempotencyKey. Only organization administrators can manage the team. MCP calls also require the accounting:admin scope; the direct API cannot send team invitations or remove members.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"team_invitations_resend","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.invitations.resend"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/team.invitations.link":{"post":{"summary":"Get the private link of a pending team invitation, to share it another way. Only organization administrators can manage the team. MCP calls also require the accounting:admin scope; the direct API cannot send team invitations or remove members.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"team_invitations_link","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.invitations.link"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/team.invitations.revoke":{"post":{"summary":"Cancel a pending team invitation so its link stops working, with source (oatmilk, or clerk for an invitation sent before Oatmilk sent its own), id, expectedRevision for an Oatmilk invitation, and idempotencyKey. Only organization administrators can manage the team. MCP calls also require the accounting:admin scope; the direct API cannot send team invitations or remove members.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"team_invitations_revoke","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.invitations.revoke"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"oatmilk"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source","id","expectedRevision","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"clerk"},"id":{"type":"string","pattern":"^orginv_[A-Za-z0-9]{8,64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["source","id","idempotencyKey"],"additionalProperties":false}]}}}}}},"/api/v1/accounting/team.members.remove":{"post":{"summary":"Remove someone from the company: turns off their Oatmilk access and removes them from the organization. Their records stay. You can't remove yourself. Requires userId and idempotencyKey. Only organization administrators can manage the team. MCP calls also require the accounting:admin scope; the direct API cannot send team invitations or remove members.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"team_members_remove","tags":["team"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/team.members.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["userId"],"additionalProperties":false}}}}}},"/api/v1/accounting/history.list":{"post":{"summary":"List everything anyone changed in the company, newest first: people in Oatmilk, Ask AI, AI apps over MCP, the API, contractors and signers in their portals, and Oatmilk's own automation (Autopilot, syncs, readers). Each item is one step (all records one person changed at once), with who, how (source), what, the record, and whether it was rolled back. Filter by from/to dates, query (text), actorIds, sources (web, assistant, mcp, api, automation, portal, signer), areas (banking, transactions, budgets, inbox, invoices, reimbursements, agreements, contractors, recruiting, tax, compliance, subscriptions, access, settings), actions (exact action names), statuses (succeeded, failed, rolledBack, active, revertible) and targetId (one record's changes). Sort by at, actor, action, area, size or source, asc or desc. Pages with cursor; total counts every match.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_list","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","maxLength":40},"to":{"type":"string","maxLength":40},"query":{"type":"string","maxLength":200},"actorIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"sources":{"maxItems":7,"type":"array","items":{"type":"string","enum":["web","assistant","mcp","api","automation","portal","signer"]}},"areas":{"maxItems":14,"type":"array","items":{"type":"string","enum":["banking","transactions","budgets","inbox","invoices","reimbursements","agreements","contractors","recruiting","tax","compliance","subscriptions","access","settings"]}},"actions":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.]{0,119}$"}},"statuses":{"maxItems":5,"type":"array","items":{"type":"string","enum":["succeeded","failed","rolledBack","active","revertible"]}},"targetId":{"type":"string","minLength":1,"maxLength":200},"sort":{"default":"at","type":"string","enum":["at","actor","action","area","size","source"]},"direction":{"default":"desc","type":"string","enum":["asc","desc"]},"cursor":{"type":"string","minLength":1,"maxLength":2000},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}}},"get":{"summary":"List everything anyone changed in the company, newest first: people in Oatmilk, Ask AI, AI apps over MCP, the API, contractors and signers in their portals, and Oatmilk's own automation (Autopilot, syncs, readers). Each item is one step (all records one person changed at once), with who, how (source), what, the record, and whether it was rolled back. Filter by from/to dates, query (text), actorIds, sources (web, assistant, mcp, api, automation, portal, signer), areas (banking, transactions, budgets, inbox, invoices, reimbursements, agreements, contractors, recruiting, tax, compliance, subscriptions, access, settings), actions (exact action names), statuses (succeeded, failed, rolledBack, active, revertible) and targetId (one record's changes). Sort by at, actor, action, area, size or source, asc or desc. Pages with cursor; total counts every match.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_list_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"to","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"actorIds","in":"query","required":false,"schema":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},{"name":"sources","in":"query","required":false,"schema":{"maxItems":7,"type":"array","items":{"type":"string","enum":["web","assistant","mcp","api","automation","portal","signer"]}}},{"name":"areas","in":"query","required":false,"schema":{"maxItems":14,"type":"array","items":{"type":"string","enum":["banking","transactions","budgets","inbox","invoices","reimbursements","agreements","contractors","recruiting","tax","compliance","subscriptions","access","settings"]}}},{"name":"actions","in":"query","required":false,"schema":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.]{0,119}$"}}},{"name":"statuses","in":"query","required":false,"schema":{"maxItems":5,"type":"array","items":{"type":"string","enum":["succeeded","failed","rolledBack","active","revertible"]}}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"sort","in":"query","required":false,"schema":{"default":"at","type":"string","enum":["at","actor","action","area","size","source"]}},{"name":"direction","in":"query","required":false,"schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2000}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/history.get":{"post":{"summary":"Read one change from History by its id: every record it touched in that step, the values before and after where Oatmilk kept them, how it was made (Ask AI, an AI app, the API, the integration key), the error when it failed, any rollback of it (or the change it rolled back), and the same record's other recent changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one change from History by its id: every record it touched in that step, the values before and after where Oatmilk kept them, how it was made (Ask AI, an AI app, the API, the integration key), the error when it failed, any rollback of it (or the change it rolled back), and the same record's other recent changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_get_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/history.facets":{"post":{"summary":"Count History by person, source and action for a date range (from/to), with the first and last change, so filters only offer choices that exist.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_facets","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.facets"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","maxLength":40},"to":{"type":"string","maxLength":40}},"additionalProperties":false}}}}},"get":{"summary":"Count History by person, source and action for a date range (from/to), with the first and last change, so filters only offer choices that exist.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_facets_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.facets"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"to","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/history.rollback.preview":{"post":{"summary":"Check whether one change from History can be rolled back and exactly what rolling it back would do, record by record: the values it puts back, what is already back, and what blocks it (a later edit, a deleted record, a closed period). For a statement or CSV import it previews undoing every line that can be undone. Returns previewFingerprint for history.rollback.apply. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_rollback_preview","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Check whether one change from History can be rolled back and exactly what rolling it back would do, record by record: the values it puts back, what is already back, and what blocks it (a later edit, a deleted record, a closed period). For a statement or CSV import it previews undoing every line that can be undone. Returns previewFingerprint for history.rollback.apply. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_rollback_preview_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/history.rollback.previewMany":{"post":{"summary":"Preview rolling back up to 50 changes from History at once, newest first, with each change's plan and one previewFingerprint for history.rollback.applyMany. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_rollback_previewMany","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.previewMany"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}}},"required":["ids"],"additionalProperties":false}}}}},"get":{"summary":"Preview rolling back up to 50 changes from History at once, newest first, with each change's plan and one previewFingerprint for history.rollback.applyMany. Nothing changes.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"history_rollback_previewMany_get","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.previewMany"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"ids","in":"query","required":true,"schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/history.rollback.apply":{"post":{"summary":"Roll back one change from History using the previewFingerprint from history.rollback.preview, a reason and an idempotencyKey. Every step runs as the person through the same checks as doing it by hand (role, revision, closed periods), and is itself recorded in History, so a rollback can be rolled back too. A change made since the preview stops it with a conflict; preview again.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"history_rollback_apply","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.apply"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","previewFingerprint","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/history.rollback.applyMany":{"post":{"summary":"Roll back up to 50 changes from History, newest first, using the previewFingerprint from history.rollback.previewMany, a reason and an idempotencyKey. Blocked changes are skipped and reported; each result says what was rolled back.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"history_rollback_applyMany","tags":["history"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/history.rollback.applyMany"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|sig-[0-9]{1,19})$"}},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["ids","previewFingerprint","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/developers.usage":{"post":{"summary":"Summarize API and MCP requests for the last 1, 7 or 30 days: totals, client and server errors, median and 95th percentile response times, requests per day, the busiest keys and apps, the busiest actions and the most common error codes. Administrators see the whole company; everyone else sees requests made with their own keys and apps. Inputs and responses are never recorded.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"developers_usage","tags":["developers"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/developers.usage"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":7,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"Summarize API and MCP requests for the last 1, 7 or 30 days: totals, client and server errors, median and 95th percentile response times, requests per day, the busiest keys and apps, the busiest actions and the most common error codes. Administrators see the whole company; everyone else sees requests made with their own keys and apps. Inputs and responses are never recorded.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"developers_usage_get","tags":["developers"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/developers.usage"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"days","in":"query","required":false,"schema":{"default":7,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/developers.requests.list":{"post":{"summary":"List recent API and MCP requests, newest first, with the request ID returned in X-Request-Id, the action, method, status, error code, duration and the key or app that sent it. Filter by status (ok, client_error, server_error), source (api, mcp), key, action or request ID. Kept for 30 days. Administrators see the whole company; everyone else sees their own requests.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"developers_requests_list","tags":["developers"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/developers.requests.list"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["ok","client_error","server_error"]},"source":{"type":"string","enum":["api","mcp"]},"credentialId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"action":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.]{0,119}$"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"days":{"default":30,"type":"integer","minimum":1,"maximum":30},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":10000}},"additionalProperties":false}}}}},"get":{"summary":"List recent API and MCP requests, newest first, with the request ID returned in X-Request-Id, the action, method, status, error code, duration and the key or app that sent it. Filter by status (ok, client_error, server_error), source (api, mcp), key, action or request ID. Kept for 30 days. Administrators see the whole company; everyone else sees their own requests.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"developers_requests_list_get","tags":["developers"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/developers.requests.list"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["ok","client_error","server_error"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["api","mcp"]}},{"name":"credentialId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"action","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.]{0,119}$"}},{"name":"requestId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":30}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chiefOfStaff.status":{"post":{"summary":"Read how the Chief of Staff (the Oatmilk agent in Discord) is set up: the Discord server it serves, whether its Gateway and scheduled posts run on this deployment, its recent activity, which integrations are connected, its profiles and their tools, the channel names that pick a profile, and its scheduled posts. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_status","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read how the Chief of Staff (the Oatmilk agent in Discord) is set up: the Discord server it serves, whether its Gateway and scheduled posts run on this deployment, its recent activity, which integrations are connected, its profiles and their tools, the channel names that pick a profile, and its scheduled posts. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_status_get","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chiefOfStaff.settings.get":{"post":{"summary":"Read every Chief of Staff setting with its revision: whether it is paused, direct messages, tools turned off everywhere, ignored people, each Discord server's and channel's rules (who it answers, profile, tools and instructions), rules for people and roles, and paused scheduled posts. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_settings_get","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read every Chief of Staff setting with its revision: whether it is paused, direct messages, tools turned off everywhere, ignored people, each Discord server's and channel's rules (who it answers, profile, tools and instructions), rules for people and roles, and paused scheduled posts. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_settings_get_get","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chiefOfStaff.servers.list":{"post":{"summary":"List the Discord servers the Chief of Staff can see, with each connected server's channels (grouped by category) and roles, read live from Discord. Pass refresh to skip the one-minute cache. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_servers_list","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.servers.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"refresh":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"List the Discord servers the Chief of Staff can see, with each connected server's channels (grouped by category) and roles, read live from Discord. Pass refresh to skip the one-minute cache. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_servers_list_get","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.servers.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"refresh","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chiefOfStaff.people.find":{"post":{"summary":"Find people in the Chief of Staff's Discord server by Discord id or part of their name, to add them to a rule or the ignored list. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_people_find","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.people.find"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"guildId":{"type":"string","pattern":"^\\d{17,20}$"},"query":{"type":"string","minLength":1,"maxLength":100,"description":"A Discord id, or part of a name or username."}},"required":["guildId","query"],"additionalProperties":false}}}}},"get":{"summary":"Find people in the Chief of Staff's Discord server by Discord id or part of their name, to add them to a rule or the ignored list. Only the platform owner's workspace has a Chief of Staff. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"chiefOfStaff_people_find_get","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.people.find"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"guildId","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{17,20}$"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"description":"A Discord id, or part of a name or username."}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/chiefOfStaff.general.update":{"post":{"summary":"Change the Chief of Staff's settings that apply everywhere: pause it, turn direct messages on or off, turn tools off everywhere, or replace the list of people it never replies to. Takes effect on its next message. Pass expectedRevision from chiefOfStaff.settings.get. Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_general_update","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.general.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"description":"Stop every reply and scheduled post until turned back on. Slash commands still answer.","type":"boolean"},"directMessages":{"type":"string","enum":["on","off"]},"disabledTools":{"description":"Tools turned off everywhere, whatever else allows them.","maxItems":9,"type":"array","items":{"type":"string","enum":["getCurrentEventsFromLuma","getEventStatsFromLuma","getEventDetailsFromLuma","getEventGuestsFromLuma","getCommunityContacts","webSearch","scrapeUrl","github","weather"]}},"ignoredPeople":{"description":"People the Chief of Staff never replies to. Replaces the list.","maxItems":200,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","pattern":"^\\d{17,20}$"},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"required":["userId"],"additionalProperties":false}},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/chiefOfStaff.servers.update":{"post":{"summary":"Change how the Chief of Staff behaves in one Discord server: turn it on or off there, choose how it replies in channels that don't say otherwise, a default profile, and instructions for the whole server. Pass the server's revision as expectedRevision (0 the first time). Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_servers_update","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.servers.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"guildId":{"type":"string","pattern":"^\\d{17,20}$"},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"enabled":{"description":"Off keeps the Chief of Staff out of the whole server: no replies and no scheduled posts.","type":"boolean"},"replyMode":{"description":"How it replies in channels that don't say otherwise: conversation (answers mentions and replies and may join in on threads it follows), mentions (only when mentioned or replied to) or off.","type":"string","enum":["conversation","mentions","off"]},"defaultProfileId":{"description":"The profile for channels whose name picks none. Null uses the agent's default (general).","anyOf":[{"type":"string","enum":["general","hackathon","organizer","news"]},{"type":"null"}]},"instructions":{"type":"string","maxLength":2000,"description":"Extra instructions the Chief of Staff follows there, in plain words. Empty clears them."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["guildId"],"additionalProperties":false}}}}}},"/api/v1/accounting/chiefOfStaff.channels.update":{"post":{"summary":"Set rules for one Discord channel and its threads: how the Chief of Staff replies there (or that it stays out), its profile, tools turned on or off, and instructions. Pass reset to clear the channel's rules. Pass the channel's revision as expectedRevision (0 the first time). Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_channels_update","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.channels.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"guildId":{"type":"string","pattern":"^\\d{17,20}$"},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"channelName":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"mode":{"description":"inherit follows the server; conversation, mentions or off replace it here and in the channel's threads.","type":"string","enum":["inherit","conversation","mentions","off"]},"profileId":{"description":"The profile for this channel. Null keeps the one its name picks.","anyOf":[{"type":"string","enum":["general","hackathon","organizer","news"]},{"type":"null"}]},"allowTools":{"description":"Tools turned on here on top of the profile's.","maxItems":9,"type":"array","items":{"type":"string","enum":["getCurrentEventsFromLuma","getEventStatsFromLuma","getEventDetailsFromLuma","getEventGuestsFromLuma","getCommunityContacts","webSearch","scrapeUrl","github","weather"]}},"blockTools":{"description":"Tools turned off here.","maxItems":9,"type":"array","items":{"type":"string","enum":["getCurrentEventsFromLuma","getEventStatsFromLuma","getEventDetailsFromLuma","getEventGuestsFromLuma","getCommunityContacts","webSearch","scrapeUrl","github","weather"]}},"instructions":{"type":"string","maxLength":2000,"description":"Extra instructions the Chief of Staff follows there, in plain words. Empty clears them."},"reset":{"description":"Clear every setting for this channel so it follows the server again.","type":"boolean"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["guildId","channelId"],"additionalProperties":false}}}}}},"/api/v1/accounting/chiefOfStaff.rules.save":{"post":{"summary":"Add or change a rule for some people: by Discord person or role, optionally only in some channels, give them tools, take tools away, answer them with a profile, or add instructions. A tool turned off anywhere else stays off. Pass id and expectedRevision to change a rule. Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_rules_save","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.rules.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"description":"The rule to change. Leave it out to add a rule.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean"},"people":{"description":"Discord people the rule applies to, each with the name to show.","maxItems":50,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","pattern":"^\\d{17,20}$"},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"required":["userId"],"additionalProperties":false}},"roles":{"description":"Discord role names the rule applies to; anyone with one of them matches.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"channelIds":{"description":"Only in these channels and their threads. Empty means everywhere.","maxItems":50,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"allowTools":{"maxItems":9,"type":"array","items":{"type":"string","enum":["getCurrentEventsFromLuma","getEventStatsFromLuma","getEventDetailsFromLuma","getEventGuestsFromLuma","getCommunityContacts","webSearch","scrapeUrl","github","weather"]}},"blockTools":{"maxItems":9,"type":"array","items":{"type":"string","enum":["getCurrentEventsFromLuma","getEventStatsFromLuma","getEventDetailsFromLuma","getEventGuestsFromLuma","getCommunityContacts","webSearch","scrapeUrl","github","weather"]}},"profileId":{"description":"Answer these people with this profile.","anyOf":[{"type":"string","enum":["general","hackathon","organizer","news"]},{"type":"null"}]},"instructions":{"type":"string","maxLength":2000,"description":"Extra instructions the Chief of Staff follows there, in plain words. Empty clears them."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/accounting/chiefOfStaff.rules.delete":{"post":{"summary":"Remove a rule for people. Pass its revision as expectedRevision. History can put it back. Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_rules_delete","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.rules.delete"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/chiefOfStaff.schedules.update":{"post":{"summary":"Pause or resume one of the Chief of Staff's scheduled posts. A paused post skips its turns and resumes at its next one, without catching up. Only the platform owner's workspace has a Chief of Staff. Administrator access required.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"chiefOfStaff_schedules_update","tags":["chiefOfStaff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/chiefOfStaff.schedules.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$","description":"A scheduled post, from chiefOfStaff.status."},"paused":{"type":"boolean"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read: 0 for something never saved. A different revision means someone else changed it first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["jobId","paused"],"additionalProperties":false}}}}}},"/api/v1/accounting/company.export":{"post":{"summary":"Export all of the company's data as one ZIP: manifest.json, data/<table>.json with every row the company has in every table, files/<bucket>/<path> with its stored files (receipts, emails, statements, agreements, invoices) and a README. Secret values (encrypted credentials and bank or tax details, sealed keys, one-time codes, private link tokens) are replaced with \"[redacted]\" and listed in redactedColumns. One download holds at most 50 MB: the records come first and files fill the rest; files that don't fit are listed with included false, and company.export.files gives a link for each. includeFiles false leaves files out (default true). Returns a link valid for 5 minutes, the counts of tables, rows and files, and how many files were skipped. Administrators only.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_export","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.export"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeFiles":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"additionalProperties":false}}}}}},"/api/v1/accounting/company.export.files":{"post":{"summary":"List the company's stored files (all but its earlier company exports) with offset and limit (1 to 100, default 50), each with its bucket, path, size and a download link valid for 5 minutes, so a client can download every file, including those too large for company.export. Returns items, total and nextOffset (null on the last page). Administrators only.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_export_files","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.export.files"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offset":{"default":0,"type":"integer","minimum":0,"maximum":10000000},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}},"get":{"summary":"List the company's stored files (all but its earlier company exports) with offset and limit (1 to 100, default 50), each with its bucket, path, size and a download link valid for 5 minutes, so a client can download every file, including those too large for company.export. Returns items, total and nextOffset (null on the last page). Administrators only.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_export_files_get","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.export.files"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000000}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/company.close":{"post":{"summary":"Permanently close the company: delete its stored files, every record it has in Oatmilk, and the company itself with its memberships. It can't be undone; export the data first with company.export. confirmName must be the company's name (case doesn't matter). Only an administrator, with their own credential (the web app, or the terminal app or an API key), can close it; AI apps and Ask AI can't. The installation's own company can't be closed. Returns the counts of rows and files deleted and whether the company's sign-in organization was deleted.","description":"Required scopes: accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"company_close","tags":["company"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/company.close"},"x-required-scopes":["accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirmName":{"type":"string","minLength":1,"maxLength":300},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["confirmName"],"additionalProperties":false}}}}}},"/api/v1/accounting/experiments.get":{"post":{"summary":"Read the experimental features the signed-in person can try in this workspace (such as RTS mode, which shows the workspace as a 3D strategy game), whether they turned experimental mode on, which experiments they turned on, and the revision. Each person chooses for themselves; the platform decides which experiments are offered.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"experiments_get","tags":["experiments"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/experiments.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the experimental features the signed-in person can try in this workspace (such as RTS mode, which shows the workspace as a 3D strategy game), whether they turned experimental mode on, which experiments they turned on, and the revision. Each person chooses for themselves; the platform decides which experiments are offered.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"experiments_get_get","tags":["experiments"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/experiments.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/experiments.update":{"post":{"summary":"Turn experimental mode on or off for the signed-in person (mode), or turn one experiment on or off (experiment with enabled). Only an experiment offered to this workspace can be turned on. Pass expectedRevision from experiments.get and an idempotencyKey. It never changes anyone else's choice.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"experiments_update","tags":["experiments"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/experiments.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"description":"Experimental mode for the signed-in person. Off stops every experiment for them without forgetting which ones they turned on.","type":"boolean"},"experiment":{"description":"The experiment to turn on or off.","type":"string","enum":["rts-mode"]},"enabled":{"description":"On or off for the experiment named in experiment.","type":"boolean"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990,"description":"The revision you last read. A different revision means the choices changed first."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.list":{"post":{"summary":"List reimbursement claims and their submitted, approved, rejected, prepared, funded, paid or returned status. Members see only their own claims; finance can review organization claims.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_list","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["submitted","approved","rejected","paid"]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List reimbursement claims and their submitted, approved, rejected, prepared, funded, paid or returned status. Members see only their own claims; finance can review organization claims.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_list_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["submitted","approved","rejected","paid"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reimbursements.get":{"post":{"summary":"Read one reimbursement claim and its purchase and payment status. Members can read only their own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one reimbursement claim and its purchase and payment status. Members can read only their own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_get_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reimbursements.forEntry":{"post":{"summary":"Read the reimbursement claim and status for one purchase, if present. Members can read only their own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_forEntry","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.forEntry"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read the reimbursement claim and status for one purchase, if present. Members can read only their own.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_forEntry_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.forEntry"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reimbursements.recipients":{"post":{"summary":"List verified Wise recipient bindings for members without exposing account details.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_recipients","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.recipients"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List verified Wise recipient bindings for members without exposing account details.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_recipients_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.recipients"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reimbursements.candidates":{"post":{"summary":"For one outgoing bank transfer, list each active member with their approved unpaid claims in the transfer's currency and the exact set of claims that adds up to the transfer, when there is exactly one. Read only; linking still uses reimbursements.link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_candidates","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["transactionId"],"additionalProperties":false}}}}},"get":{"summary":"For one outgoing bank transfer, list each active member with their approved unpaid claims in the transfer's currency and the exact set of claims that adds up to the transfer, when there is exactly one. Read only; linking still uses reimbursements.link.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_candidates_get","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"transactionId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reimbursements.claimPurchase":{"post":{"summary":"Create a personal expense claim for an active member from an existing unallocated receipt purchase, with its current revision, exact original evidence and explicit confirmation of who paid. Never creates or changes the expense.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_claimPurchase","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.claimPurchase"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"userId":{"type":"string","minLength":1,"maxLength":200},"receiptEvidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"personallyPaid":{"type":"boolean","const":true},"onBehalfConfirmed":{"type":"boolean"},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","expectedEntryRevision","userId","receiptEvidenceId","personallyPaid","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.recordPayment":{"post":{"summary":"Record an existing untouched outgoing bank payment to an explicitly confirmed active member as a reimbursement transfer awaiting receipt-backed claims. Never invents purchases or tax and never sends money.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_recordPayment","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.recordPayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedBankEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBankEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"userId":{"type":"string","minLength":1,"maxLength":200},"payeeConfirmed":{"type":"boolean","const":true},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["transactionId","expectedTransactionRevision","userId","payeeConfirmed","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.completePayment":{"post":{"summary":"Complete an awaiting-receipts bank reimbursement only with approved original receipt purchases for the same member, currency and exact total, using current payment, bank and entry revisions.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_completePayment","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.completePayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedPaymentRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedBankEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBankEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"claimIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"payeeConfirmed":{"type":"boolean","const":true},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["paymentId","expectedPaymentRevision","transactionId","expectedTransactionRevision","expectedBankEntryId","expectedBankEntryRevision","claimIds","payeeConfirmed","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.submit":{"post":{"summary":"Submit a reimbursement claim for a personally paid expense from your own original receipt. Oatmilk never duplicates the expense; check its status with reimbursements.list, reimbursements.get or reimbursements.forEntry.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_submit","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.submit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.approve":{"post":{"summary":"Approve up to 100 submitted reimbursement claims in one atomic review, recording receipt validity and whether the claimant was an employee or officer at purchase for GST/HST treatment.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_approve","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.approve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"claims":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"receiptValid":{"type":"boolean"},"employeeAtPurchase":{"type":"boolean"}},"required":["id","expectedRevision","receiptValid","employeeAtPurchase"],"additionalProperties":false}},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["claims","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.reject":{"post":{"summary":"Reject a submitted reimbursement with a reason and expected revision.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_reject","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.reject"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.bindRecipient":{"post":{"summary":"Bind an existing Wise recipient to an active member after verifying its name, currency and business profile. No bank details are returned.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_bindRecipient","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.bindRecipient"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"recipientId":{"type":"string","pattern":"^\\d{1,30}$"},"holderName":{"type":"string","minLength":2,"maxLength":200},"identityMismatchConfirmed":{"type":"boolean"},"identityMismatchReason":{"type":"string","minLength":10,"maxLength":1000},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["userId","currency","recipientId","holderName","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.prepare":{"post":{"summary":"Prepare one Wise reimbursement for approved claims belonging to the same member and currency. Preparation never sends funds.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_prepare","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"claimIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"returnReviewReason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["claimIds"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.refreshRecipient":{"post":{"summary":"Refresh the verified Wise recipient on an unsent prepared reimbursement after the recipient binding changes. Requires the payment revision and never sends funds.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_refreshRecipient","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.refreshRecipient"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["paymentId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.link":{"post":{"summary":"Link an existing outgoing bank transfer to approved expense claims with the same member, currency and exact total. The bank entry becomes a transfer, not another expense.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_link","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.link"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"claimIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedBankEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBankEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"payeeConfirmed":{"type":"boolean","const":true},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["claimIds","transactionId","expectedTransactionRevision","reason","payeeConfirmed"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.identify":{"post":{"summary":"Classify one historical Wise transfer against approved member claims. A dry run returns evidence; apply links only one exact named payee and claim match.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reimbursements_identify","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.identify"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"apply":{"default":false,"type":"boolean"},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["transactionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.matchPayment":{"post":{"summary":"Match a funded Wise reimbursement to its imported transfer using Wise's exact transfer reference and source amount. The bank entry becomes a transfer.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_matchPayment","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.matchPayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedBankEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedBankEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["paymentId","transactionId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.send":{"post":{"summary":"Send one prepared Wise reimbursement for approved claims belonging to one member and currency. Requires a current administrator, the accounting:admin integration scope, the payment's current revision and an idempotency key. A real Wise payout may occur; a sidebar agent asks the person who started its chat to approve this action. Never auto-sends.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_send","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.send"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reimbursements.syncPayment":{"post":{"summary":"Read a previously funded Wise reimbursement status and update the claim only when Wise confirms payout or return. Never sends funds.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reimbursements_syncPayment","tags":["reimbursements"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reimbursements.syncPayment"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/wise.receipts.review":{"post":{"summary":"Compare the previous Wise source, newly read evidence, and saved transaction using a private immutable review. Unknown tax stays distinct from confirmed zero.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_receipts_review","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.review"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Compare the previous Wise source, newly read evidence, and saved transaction using a private immutable review. Unknown tax stays distinct from confirmed zero.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_receipts_review_get","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.review"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"reviewId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/wise.receipts.decide":{"post":{"summary":"Keep saved fields or accept proved incoming merchant, canonical tax, and address values from an immutable Wise receipt review. Values come from the server. Requires exact review and entry revisions, fingerprint, reason, and idempotency key. Bank money and date use the existing correction workflow.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"wise_receipts_decide","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.decide"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reviewRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"selections":{"maxItems":7,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["merchant","date","currency","amountMinor","taxMinor","merchantAddress","travelAddress"]},"choice":{"type":"string","enum":["keep","incoming"]}},"required":["field","choice"],"additionalProperties":false}},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["reviewId","expectedRevision","reviewRevision","sourceFingerprint","selections","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/imports.undo.preview":{"post":{"summary":"Preview selective Undo for one manual CSV or uploaded statement import, or guarded Restore for one complete Undo operation. Resolve batch, statement, transaction, or bank-row context inside the organization. Returns paged groups, treatment choices, blockers, and an exact whole-graph fingerprint while preserving originals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_undo_preview","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"undo"},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["batch","statement","entry","bank_transaction"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","id"],"additionalProperties":false},"cursor":{"type":"string","minLength":1,"maxLength":512},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500}},"required":["mode","target"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"restore"},"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cursor":{"type":"string","minLength":1,"maxLength":512},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500}},"required":["mode","operationId"],"additionalProperties":false}]}}}}},"get":{"summary":"Preview selective Undo for one manual CSV or uploaded statement import, or guarded Restore for one complete Undo operation. Resolve batch, statement, transaction, or bank-row context inside the organization. Returns paged groups, treatment choices, blockers, and an exact whole-graph fingerprint while preserving originals.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_undo_preview_get","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/imports.undo.apply":{"post":{"summary":"Undo explicitly selected import-owned groups atomically using the current preview fingerprint, reason, and idempotency key. Keep reviewed or edited transactions and detach their incorrect imported bank links when safe; remove only proved untouched derived entries. Preserves originals and audit. Closed periods and payment dependencies block changes.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"imports_undo_apply","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.apply"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"batchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupIds":{"minItems":1,"maxItems":10001,"type":"array","items":{"type":"string","maxLength":64}},"entryTreatments":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"treatment":{"type":"string","enum":["keep_entry","remove_derived_entry"]}},"required":["entryId","treatment"],"additionalProperties":false}},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["batchId","groupIds","previewFingerprint","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/imports.undo.history":{"post":{"summary":"Read paged organization import, Undo, and Restore history with actual ownership counts and audited reasons. Optional batch and account filters keep the list scoped. Restore eligibility is checked by its lazy preview.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_undo_history","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"batchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cursor":{"type":"string","minLength":1,"maxLength":512},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}}},"get":{"summary":"Read paged organization import, Undo, and Restore history with actual ownership counts and audited reasons. Optional batch and account filters keep the list scoped. Restore eligibility is checked by its lazy preview.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_undo_history_get","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.history"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"batchId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/imports.undo.restore":{"post":{"summary":"Restore one entire Undo operation atomically using its current operation revision, inverse preview fingerprint, reason, and idempotency key. The server verifies exact after-state, current relationships, source ownership, and open periods. Later edits or conflicting allocations block restoration.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"imports_undo_restore","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.undo.restore"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"previewFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["operationId","expectedRevision","previewFingerprint","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/matching.receiptConsolidation.candidates":{"post":{"summary":"Find current source-backed existing purchases and complete Wise card payment groups for one receipt. Candidates require original-source review and do not prove business use or tax eligibility. Returns explicit limits and source blockers; never confirms a match.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_receiptConsolidation_candidates","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receiptEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["receiptEntryId"],"additionalProperties":false}}}}},"get":{"summary":"Find current source-backed existing purchases and complete Wise card payment groups for one receipt. Candidates require original-source review and do not prove business use or tax eligibility. Returns explicit limits and source blockers; never confirms a match.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_receiptConsolidation_candidates_get","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.candidates"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"receiptEntryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.receiptConsolidation.preview":{"post":{"summary":"Inspect current originals, source identities, exact signed payment pieces and revisions before manually linking a receipt to an existing bank purchase. No financial fields or allocations are changed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_receiptConsolidation_preview","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receiptEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mode":{"type":"string","enum":["same_order","wise_card_settlement"]},"transactionIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["receiptEntryId","targetEntryId","mode","transactionIds"],"additionalProperties":false}}}}},"get":{"summary":"Inspect current originals, source identities, exact signed payment pieces and revisions before manually linking a receipt to an existing bank purchase. No financial fields or allocations are changed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_receiptConsolidation_preview_get","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"receiptEntryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"targetEntryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mode","in":"query","required":true,"schema":{"type":"string","enum":["same_order","wise_card_settlement"]}},{"name":"transactionIds","in":"query","required":true,"schema":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.receiptConsolidation.confirm":{"post":{"summary":"Dashboard-only confirmation after a finance member reviews the current original documents and source-backed payment identity. Requires exact preview fingerprint, revisions and original IDs. Adds a receipt association and alias without changing bank amounts, allocations, financial fields, tax or review status. API, MCP and automatic actors cannot approve.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_receiptConsolidation_confirm","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"receiptEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedReceiptRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"targetEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedTargetRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mode":{"type":"string","enum":["same_order","wise_card_settlement"]},"transactions":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"expectedSourceFingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"},"reviewedOriginalEvidenceIds":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"originalsReviewed":{"type":"boolean","const":true},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["receiptEntryId","expectedReceiptRevision","targetEntryId","expectedTargetRevision","mode","transactions","expectedSourceFingerprint","reviewedOriginalEvidenceIds","originalsReviewed","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/matching.receiptConsolidation.undo":{"post":{"summary":"Dashboard-only History rollback of a receipt consolidation whose exact revisions and source state remain unchanged. Restores only its receipt alias and added association; existing purchases, bank pieces, allocations, tax and review status remain intact.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_receiptConsolidation_undo","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.receiptConsolidation.undo"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"receiptRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"targetRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","receiptRevision","targetRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/wise.receipts.sync":{"post":{"summary":"Queue a preserved, evidence-only read of receipts attached to this exact existing Wise purchase. Requires current entry revision and a stable idempotency key. Reviewed purchases are supported; closed purchases retain evidence without financial changes.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"wise_receipts_sync","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.sync"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/wise.receipts.status":{"post":{"summary":"Read scoped durable receipt-sync progress for one Wise purchase without starting provider work.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_receipts_status","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read scoped durable receipt-sync progress for one Wise purchase without starting provider work.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_receipts_status_get","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.receipts.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documentRequests.recipients":{"post":{"summary":"Search active contractors and team members by name or email for a document request.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documentRequests_recipients","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.recipients"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"default":"","type":"string","maxLength":100}},"additionalProperties":false}}}}},"get":{"summary":"Search active contractors and team members by name or email for a document request.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documentRequests_recipients_get","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.recipients"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"query","in":"query","required":false,"schema":{"default":"","type":"string","maxLength":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documentRequests.list":{"post":{"summary":"Read this organization's document requests and their receipt status.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documentRequests_list","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"Read this organization's document requests and their receipt status.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"documentRequests_list_get","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/documentRequests.send":{"post":{"summary":"Email a document request with an expiring private upload link and an authenticated reply path. Requires a recipient and idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documentRequests_send","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.send"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contractorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"title":{"type":"string","minLength":3,"maxLength":160},"message":{"default":"","type":"string","maxLength":2000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["email","title"],"additionalProperties":false}}}}}},"/api/v1/accounting/documentRequests.revoke":{"post":{"summary":"Revoke an outstanding document request and cancel queued delivery.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"documentRequests_revoke","tags":["documentRequests"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/documentRequests.revoke"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/identity.get":{"post":{"summary":"Read the authenticated user, organization, whether it is a company or their personal workspace (workspaceKind), role and granted permissions without exposing credentials.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"identity_get","tags":["identity"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/identity.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the authenticated user, organization, whether it is a company or their personal workspace (workspaceKind), role and granted permissions without exposing credentials.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"identity_get_get","tags":["identity"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/identity.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.list":{"post":{"summary":"Search accounting entries by query, status, account, category or date. Contributor results contain only their own entries.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_list","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeReversed":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"search":{"type":"string","maxLength":200},"status":{"type":"string","enum":["needs_review","reviewed"]},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"deleted":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"autopilotState":{"type":"string","enum":["working","needs_you","done"]},"ask":{"type":"string","enum":["forward_receipt","review_document","contractor_invoice","choose_contractor","choose_category","confirm_business","confirm_income","confirm_tax","match_payout","approve","import_statement","reimbursement_receipts"]},"source":{"type":"string","enum":["stripe","receipt","bank"]},"type":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]},"minAmount":{"type":"string","pattern":"^\\d+$"},"maxAmount":{"type":"string","pattern":"^\\d+$"},"sortBy":{"type":"string","enum":["merchant","date","type","status","amount"]},"sortDirection":{"type":"string","enum":["asc","desc"]},"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"untagged":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},"additionalProperties":false}}}}},"get":{"summary":"Search accounting entries by query, status, account, category or date. Contributor results contain only their own entries.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_list_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeReversed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["needs_review","reviewed"]}},{"name":"categoryId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"autopilotState","in":"query","required":false,"schema":{"type":"string","enum":["working","needs_you","done"]}},{"name":"ask","in":"query","required":false,"schema":{"type":"string","enum":["forward_receipt","review_document","contractor_invoice","choose_contractor","choose_category","confirm_business","confirm_income","confirm_tax","match_payout","approve","import_statement","reimbursement_receipts"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["stripe","receipt","bank"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["merchant","date","type","status","amount"]}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"untagged","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.get":{"post":{"summary":"Get an entry by id with its evidence and allocations.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get an entry by id with its evidence and allocations.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"entries_get_get","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/entries.attachReceipt":{"post":{"summary":"Attach a receipt entry to an existing compatible bank entry without duplicating expenses. Requires both current revisions and an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_attachReceipt","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.attachReceipt"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"receiptExpectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","receiptEntryId","expectedRevision","receiptExpectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.evidence.prepare":{"post":{"summary":"Prepare an immutable supporting-original upload for an active editable transaction. Supply entryId, filename, mimeType, sizeBytes, sha256 and a stable idempotencyKey. Skip PUT when alreadyUploaded, then confirm. Adds documents alongside existing originals without creating purchases or changing financial fields.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_evidence_prepare","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.evidence.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1,"maxLength":500},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","message/rfc822"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["entryId","filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.evidence.confirm":{"post":{"summary":"Verify and append a prepared supporting original to its exact transaction with entryId, submissionId and idempotencyKey. Returns the preserved evidence and an extraction-only job; reading never creates purchases or changes financial fields. Duplicate originals on the same transaction are reused.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_evidence_confirm","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.evidence.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","submissionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.create":{"post":{"summary":"Manually create a receipt entry from preserved evidence when extraction needs correction. Requires the submission revision, exact minor-unit amounts and an idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_create","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"merchant":{"type":"string","minLength":1,"maxLength":500},"date":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amountMinor":{"type":"string","pattern":"^\\d+$"},"taxMinor":{"type":"string","pattern":"^\\d+$"},"taxKnown":{"type":"boolean"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"paymentAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]},"notes":{"default":"","type":"string","maxLength":10000},"sourceFactIndex":{"type":"integer","minimum":0,"maximum":19},"status":{"type":"string","enum":["reviewed"]},"duplicateDecision":{"type":"string","enum":["keep_separate"]},"tripId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tripRole":{"type":"string","enum":["lodging","hold","room_charge","meal","transport","other"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["submissionId","expectedRevision","merchant","date","currency","amountMinor","taxMinor","type"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.retryStep":{"post":{"summary":"Restart a supported processing step for one transaction using its current revision and an idempotency key. Inspect the activity before choosing only_step or from_here; unsupported modes, protected human decisions, closed periods, and stale revisions are rejected. Review restarts require an administrator.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_retryStep","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.retryStep"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"step":{"type":"string","enum":["vendor_context","classifier","matching","receipt_read","review"]},"mode":{"type":"string","enum":["only_step","from_here"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","expectedRevision","step","mode"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.update":{"post":{"summary":"Edit an entry using id, expectedRevision, idempotencyKey, merchant, date, amountMinor, currency, categoryId, paymentAccountId, type, status and notes. Closed periods cannot be changed. A matched entry keeps its amount, currency and account, and its type must follow the bank movement: money in is income, refund or transfer; money out is expense, fee, income_refund or transfer. Pass learn: false when putting an earlier value back, as Undo does, so the correction isn't retained as vendor learning.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_update","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"receiptReviewSource":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceFactIndex":{"type":"integer","minimum":0,"maximum":19},"sourceExtractionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceFact":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["submissionId","sourceFactIndex","sourceExtractionRevision","sourceFact"],"additionalProperties":false},"duplicateDecision":{"type":"string","enum":["keep_separate"]},"merchant":{"type":"string","minLength":1,"maxLength":500},"date":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"amountMinor":{"type":"string","pattern":"^\\d+$"},"taxMinor":{"type":"string","pattern":"^\\d+$"},"categoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"paymentAccountId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"type":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]},"status":{"type":"string","enum":["needs_review","reviewed"]},"notes":{"type":"string","maxLength":10000},"splits":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountMinor":{"type":"string","pattern":"^\\d+$"}},"required":["categoryId","amountMinor"],"additionalProperties":false}},"learn":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/entries.bulkCategorize":{"post":{"summary":"Categorize a set of entries with their current revisions. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"entries_bulkCategorize","tags":["entries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/entries.bulkCategorize"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entries":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entries","categoryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/categories.list":{"post":{"summary":"List organization categories with parent_id, description, display path (\"Events › Hackathons\"), taxonomy_key, the caller's last_used_at and rule_count. Contributors see active categories only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"categories_list","tags":["categories"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/categories.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List organization categories with parent_id, description, display path (\"Events › Hackathons\"), taxonomy_key, the caller's last_used_at and rule_count. Contributors see active categories only.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"categories_list_get","tags":["categories"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/categories.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/categories.create":{"post":{"summary":"Create an accounting category using name and idempotencyKey, with an optional top-level parentId (subcategories are one level deep), description (up to 500 characters, read by the AI) and rules: merchant words that always use this category. Requires finance access.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"categories_create","tags":["categories"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/categories.create"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"parentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":{"type":"string","maxLength":500},"rules":{"maxItems":20,"type":"array","items":{"type":"string","minLength":2,"maxLength":200}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["name"],"additionalProperties":false}}}}}},"/api/v1/accounting/categories.update":{"post":{"summary":"Rename, move (parentId, or null for top level), describe or deactivate a category with a revision check, or choose it for automatic filing with useFor (income, bank_fees, other, contractors, interest_income). A category with active subcategories can't be deactivated. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"categories_update","tags":["categories"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/categories.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100},"active":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string","maxLength":500},"useFor":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["income","bank_fees","other","contractors","interest_income"]}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/categories.addRecommended":{"post":{"summary":"Add the recommended categories the organization doesn't have yet, archived until someone turns them on. Supply idempotencyKey and optional keys to add only some. Existing categories are never renamed or moved. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"categories_addRecommended","tags":["categories"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/categories.addRecommended"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keys":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/accounts.list":{"post":{"summary":"List available bank and payment accounts.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accounts_list","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List available bank and payment accounts.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accounts_list_get","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accounts.create":{"post":{"summary":"Create an RBC or other manually imported bank account.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accounts_create","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.create"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","enum":["rbc","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["name","provider","currency"],"additionalProperties":false}}}}}},"/api/v1/accounting/accounts.update":{"post":{"summary":"Set an account display name using the current revision and an idempotency key. Provider identity and currency remain unchanged.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accounts_update","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","name","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/accounts.lifecycle.preview":{"post":{"summary":"Read the account and its latest verified statement end date before marking it inactive. Returns the next-day cutoff, or null when no verified statement is available.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accounts_lifecycle_preview","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.lifecycle.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read the account and its latest verified statement end date before marking it inactive. Returns the next-day cutoff, or null when no verified statement is available.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"accounts_lifecycle_preview_get","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.lifecycle.preview"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/accounts.lifecycle":{"post":{"summary":"Mark an account inactive from an explicit date or since its last verified statement, or reactivate it. Preserves historical records and earlier statement obligations. Requires the current revision and an idempotency key.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"accounts_lifecycle","tags":["accounts"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/accounts.lifecycle"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"active":{"type":"boolean"},"inactiveSince":{"type":"string"},"sinceLastStatement":{"type":"boolean","const":true}},"required":["id","expectedRevision","active"],"additionalProperties":false}}}}}},"/api/v1/accounting/transactions.list":{"post":{"summary":"Search imported bank and card transactions with search text, accountId, currency, from/to dates, allocation (matched, unmatched or partial), direction (in or out), minAmount/maxAmount in minor units, limit and offset. Each line includes allocatedMinor and the entry ids it is matched to.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_list","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeReversed":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"search":{"type":"string","maxLength":200},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"},"allocation":{"type":"string","enum":["matched","unmatched","partial"]},"direction":{"type":"string","enum":["in","out"]},"minAmount":{"type":"string","pattern":"^\\d+$"},"maxAmount":{"type":"string","pattern":"^\\d+$"},"tagId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"untagged":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Search imported bank and card transactions with search text, accountId, currency, from/to dates, allocation (matched, unmatched or partial), direction (in or out), minAmount/maxAmount in minor units, limit and offset. Each line includes allocatedMinor and the entry ids it is matched to.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_list_get","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeReversed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"allocation","in":"query","required":false,"schema":{"type":"string","enum":["matched","unmatched","partial"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["in","out"]}},{"name":"minAmount","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"maxAmount","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+$"}},{"name":"tagId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"untagged","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/transactions.correct":{"post":{"summary":"Correct an unallocated CSV bank row with its revision, reason and idempotency key. Original statement evidence and previous import identities remain preserved. Closed periods and Wise rows cannot be edited.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"transactions_correct","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.correct"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":1000},"date":{"type":"string"},"amountMinor":{"type":"string","pattern":"^-?\\d+$"},"description":{"type":"string","minLength":1,"maxLength":2000},"reference":{"type":"string","maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/transactions.reverse":{"post":{"summary":"Exclude an erroneous unallocated CSV bank row with an audited reason. Preserves evidence and duplicate detection.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"transactions_reverse","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.reverse"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/transactions.restore":{"post":{"summary":"Restore a previously reversed CSV bank row with a revision check and audited reason.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"transactions_restore","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.restore"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/imports.download":{"post":{"summary":"Get an authorized short-lived download for the original statement or CSV import evidence.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_download","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get an authorized short-lived download for the original statement or CSV import evidence.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_download_get","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/transactions.documents.download":{"post":{"summary":"Get a short-lived download for a document Oatmilk fetched from the bank provider for a transaction, such as Wise's transfer confirmation for a contractor payment. Ids are listed on entries.get as providerDocuments.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_documents_download","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.documents.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived download for a document Oatmilk fetched from the bank provider for a transaction, such as Wise's transfer confirmation for a contractor payment. Ids are listed on entries.get as providerDocuments.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"transactions_documents_download_get","tags":["transactions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/transactions.documents.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/imports.preview":{"post":{"summary":"Validate a CSV import using accountId, csv text and mapping with date, description, amount or debit/credit, and dateFormat. Returns errors without booking transactions.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"imports_preview","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.preview"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"csv":{"type":"string","maxLength":5000000},"filename":{"default":"statement.csv","type":"string","minLength":1,"maxLength":255},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"mapping":{"type":"object","properties":{"date":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"amount":{"type":"string"},"debit":{"type":"string"},"credit":{"type":"string"},"reference":{"type":"string"},"dateFormat":{"type":"string","enum":["YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY"]},"columns":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["date","description","dateFormat"],"additionalProperties":false}},"required":["accountId","csv","currency","mapping"],"additionalProperties":false}}}}}},"/api/v1/accounting/imports.commit":{"post":{"summary":"Import an RBC CSV with accountId, csv, filename, mapping and idempotencyKey. Preserves the original and deduplicates transactions. Autopilot classifies the new lines afterwards unless skipAi is true.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"imports_commit","tags":["imports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/imports.commit"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"csv":{"type":"string","maxLength":5000000},"filename":{"default":"statement.csv","type":"string","minLength":1,"maxLength":255},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"mapping":{"type":"object","properties":{"date":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"amount":{"type":"string"},"debit":{"type":"string"},"credit":{"type":"string"},"reference":{"type":"string"},"dateFormat":{"type":"string","enum":["YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY"]},"columns":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["date","description","dateFormat"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"skipAi":{"type":"boolean"}},"required":["accountId","csv","currency","mapping"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.list":{"post":{"summary":"List reconciliation records and unmatched items using account and date filters.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reconciliation_list","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeReversed":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"search":{"type":"string","maxLength":200},"status":{"type":"string","enum":["needs_review","reviewed"]},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"},"limit":{"default":100,"type":"integer","minimum":1,"maximum":500},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"List reconciliation records and unmatched items using account and date filters.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reconciliation_list_get","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"includeReversed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["needs_review","reviewed"]}},{"name":"categoryId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reconciliation.createEntry":{"post":{"summary":"Create an entry from an imported bank transaction with an explicit type and optional category. Reuses existing entries on retry.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_createEntry","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.createEntry"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["transactionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.match":{"post":{"summary":"Allocate a bank transaction to an entry with entryId, transactionId, amountMinor in the receipt currency, expectedRevision and idempotencyKey. Cross-currency matches also require bankAmountMinor, exchangeRate (bank major units per receipt major unit), exchangeRateDate and exchangeRateSource. Finance must review foreign-exchange matches explicitly.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_match","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.match"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountMinor":{"type":"string","pattern":"^\\d+$"},"bankAmountMinor":{"type":"string","pattern":"^\\d+$"},"exchangeRate":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,18})?$"},"exchangeRateDate":{"type":"string"},"exchangeRateSource":{"type":"string","minLength":3,"maxLength":1000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","transactionId","amountMinor","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.unmatch":{"post":{"summary":"Remove an allocation using allocationId, expectedRevision and idempotencyKey. Finance only, with audit history.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_unmatch","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.unmatch"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"allocationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["allocationId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.split":{"post":{"summary":"Split an entry among categories using exact minor-unit amounts, revision and idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_split","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.split"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"splits":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountMinor":{"type":"string","pattern":"^\\d+$"}},"required":["categoryId","amountMinor"],"additionalProperties":false}},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","splits","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.close":{"post":{"summary":"Explicitly close an account period after its opening, movement and closing balances reconcile. Finance access required; reopening needs an administrator and the accounting:admin scope (reconciliation.reopen).","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_close","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.close"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"},"openingMinor":{"type":"string","pattern":"^-?\\d+$"},"closingMinor":{"type":"string","pattern":"^-?\\d+$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["accountId","from","to","openingMinor","closingMinor","currency"],"additionalProperties":false}}}}}},"/api/v1/accounting/reconciliation.reopen":{"post":{"summary":"Reopen a closed accounting period with an audited administrator reason.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reconciliation_reopen","tags":["reconciliation"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reconciliation.reopen"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":3,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/settings.get":{"post":{"summary":"Read accounting fiscal settings and integration configuration. Administrator access required.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"settings_get","tags":["settings"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/settings.get"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read accounting fiscal settings and integration configuration. Administrator access required.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"settings_get_get","tags":["settings"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/settings.get"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/settings.update":{"post":{"summary":"Update fiscal and bank configuration with revision checks.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"settings_update","tags":["settings"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"fiscalYearEnd":{"type":"string"},"taxRegistration":{"type":"string","minLength":1,"maxLength":100},"bankHistoryStart":{"type":"string"},"wiseProfileId":{"type":"string","pattern":"^\\d+$"}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/settings.rotateMailbox":{"post":{"summary":"Rotate the randomly generated receiving alias with revision checks.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"settings_rotateMailbox","tags":["settings"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/settings.rotateMailbox"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"label":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,23}$"}},"required":["expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/classifier.mailboxes.list":{"post":{"summary":"List organization email types, receiving addresses, and classifier guidance.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"classifier_mailboxes_list","tags":["classifier"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/classifier.mailboxes.list"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List organization email types, receiving addresses, and classifier guidance.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"classifier_mailboxes_list_get","tags":["classifier"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/classifier.mailboxes.list"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/classifier.mailboxes.save":{"post":{"summary":"Create a receiving email type or revise its routing and category classifier guidance with revision and idempotency checks. Credential screening and human review remain mandatory.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"classifier_mailboxes_save","tags":["classifier"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/classifier.mailboxes.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mailboxKey":{"type":"string","enum":["accounting","invoices","signatures","reminders","contractors","notifications"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"displayName":{"type":"string","minLength":1,"maxLength":100},"routingGuidance":{"type":"string","maxLength":2000},"categoryGuidance":{"type":"string","maxLength":2000},"active":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["displayName","routingGuidance","categoryGuidance"],"additionalProperties":false}}}}}},"/api/v1/accounting/ai.models.list":{"post":{"summary":"List the decision models the receipt-matching and mail-routing classifiers can run on: AI Gateway's live list of evaluation models (id, name, provider, description, context window, input price per million tokens, whether the provider trains on the data, and whether Oatmilk has tested it), or the install's own model server when it runs local models. Falls back to Oatmilk's tested models when the gateway can't be reached. A model Oatmilk hasn't tested must pass ai.sandbox.evaluate before it is saved.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_models_list","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.models.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the decision models the receipt-matching and mail-routing classifiers can run on: AI Gateway's live list of evaluation models (id, name, provider, description, context window, input price per million tokens, whether the provider trains on the data, and whether Oatmilk has tested it), or the install's own model server when it runs local models. Falls back to Oatmilk's tested models when the gateway can't be reached. A model Oatmilk hasn't tested must pass ai.sandbox.evaluate before it is saved.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_models_list_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.models.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/ai.settings.get":{"post":{"summary":"Read the organization's effective matching and routing automation settings, including models, thresholds, and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_settings_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the organization's effective matching and routing automation settings, including models, thresholds, and revision.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_settings_get_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.settings.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/ai.settings.update":{"post":{"summary":"Revise matching and routing models, thresholds, and automatic matching with revision and idempotency checks. Changes apply to future evaluations only; stored decisions keep their recorded provenance.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"ai_settings_update","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.settings.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"matchModel":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0.9,"maximum":1},"providerConfidence":{"type":"number","minimum":0.85,"maximum":1},"sameEventProbability":{"type":"number","minimum":0.9,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0.1,"maximum":1}},"required":["selectedProbability","providerConfidence","sameEventProbability","runnerUpMargin"],"additionalProperties":false},"routingModel":{"type":"string","minLength":1,"maxLength":120},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["probability","confidence"],"additionalProperties":false},"autoApply":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["matchModel","matchThresholds","routingModel","routingThresholds","autoApply"],"additionalProperties":false}}}}}},"/api/v1/accounting/ai.sandbox.evaluate":{"post":{"summary":"Evaluate a supplied fixture against saved or draft automation settings without writing anything. kind routing classifies an email fixture; kind matching scores a receipt against bank candidates; kind document reads a real file exactly as the inbox does (file {filename, mimeType, contentBase64}, up to 2 MB: a receipt, invoice or statement as a PDF, image, office or text document, or an original .eml email, which is classified first): every page is turned into images with logos and signature graphics set aside, read twice with vision and settled by the stronger model when the readings disagree, and checked as the books would take it. It returns the classifier answer, the facts, the vision check, the entry or flags for each document, and the parts read. kind record reads a kept-record file (file as for document, recordKind tax_document, company_document or other) exactly as Tax › Records reads one, with the same pages, model, prompt and schema, and returns its fields, warnings, model, prompt version and parts; for a company record also describesCompany, wouldFill (filled, nothing_new, other_company or needs_admin) and the profile fields it fills or differs on. kind email runs the email-sorting classifier on an email already in the company inbox (messageId), rebuilt from what was stored when it arrived, and returns the new decision with what was decided at the time (example.stored). kind receipt runs the matcher on a receipt entry (entryId) against its current bank and card candidates (draft may also set autoApply). Both accept the same draft model and thresholds as routing and matching. Nothing is saved. Use it to test the pipeline without the dashboard, and to test custom models before saving them.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_sandbox_evaluate","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.sandbox.evaluate"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"routing"},"mailboxKey":{"default":"accounting","type":"string","maxLength":40},"fixture":{"type":"object","properties":{"subject":{"type":"string","maxLength":2000},"text":{"type":"string","maxLength":20000},"senderDomain":{"type":"string","maxLength":200},"attachmentNames":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":300}}},"required":["subject","text","senderDomain","attachmentNames"],"additionalProperties":false},"useSavedConfig":{"default":true,"type":"boolean"},"draft":{"default":{},"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0,"maximum":1},"providerConfidence":{"type":"number","minimum":0,"maximum":1},"sameEventProbability":{"type":"number","minimum":0,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false}},"additionalProperties":false}},"required":["kind","fixture"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"matching"},"fixture":{"type":"object","properties":{"receipt":{"type":"object","properties":{"entryId":{"type":"string","minLength":1,"maxLength":100},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"date":{"type":"string","maxLength":10},"currency":{"type":"string","maxLength":3},"amountMinor":{"type":"string","maxLength":30},"type":{"type":"string","enum":["expense","income","income_refund","refund","fee","transfer","suspense"]},"merchant":{"type":"string","maxLength":300},"description":{"type":"string","maxLength":2000},"invoiceNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"sourceEvidenceIds":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}},"paymentAccountId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"allocatedMinor":{"type":"string","maxLength":30},"split":{"type":"boolean"},"closed":{"type":"boolean"},"requiresReview":{"type":"boolean"}},"required":["entryId","revision","date","currency","amountMinor","type","merchant","description","sourceEvidenceIds","paymentAccountId","allocatedMinor","split","closed","requiresReview"],"additionalProperties":false},"candidates":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"maxLength":100},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"provider":{"type":"string","enum":["wise","rbc","stripe","other"]},"accountId":{"type":"string","minLength":1,"maxLength":100},"date":{"type":"string","maxLength":10},"currency":{"type":"string","maxLength":3},"amountMinor":{"type":"string","maxLength":30},"availableAmountMinor":{"type":"string","maxLength":30},"description":{"type":"string","maxLength":2000},"reference":{"type":"string","maxLength":1000},"sourceEvidenceIds":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}},"availability":{"type":"string","enum":["unallocated","bank_entry_without_receipt","partial","allocated","unavailable"]},"status":{"type":"string","enum":["posted","pending","failed"]},"reversed":{"type":"boolean"},"closed":{"type":"boolean"},"transactionType":{"type":"string","enum":["payment","refund","transfer","fee","unknown"]}},"required":["transactionId","revision","provider","accountId","date","currency","amountMinor","availableAmountMinor","description","reference","sourceEvidenceIds","availability","status","reversed","closed"],"additionalProperties":false}}},"required":["receipt","candidates"],"additionalProperties":false},"useSavedConfig":{"default":true,"type":"boolean"},"draft":{"default":{},"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0,"maximum":1},"providerConfidence":{"type":"number","minimum":0,"maximum":1},"sameEventProbability":{"type":"number","minimum":0,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false}},"additionalProperties":false}},"required":["kind","fixture"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"document"},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","minLength":3,"maxLength":120},"contentBase64":{"type":"string","minLength":4,"maxLength":2900000}},"required":["filename","mimeType","contentBase64"],"additionalProperties":false},"documentKind":{"type":"string","enum":["receipt","invoice","credit_note","statement","other","unknown"]},"useSavedConfig":{"default":true,"type":"boolean"},"draft":{"default":{},"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0,"maximum":1},"providerConfidence":{"type":"number","minimum":0,"maximum":1},"sameEventProbability":{"type":"number","minimum":0,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false}},"additionalProperties":false}},"required":["kind","file"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"record"},"recordKind":{"type":"string","enum":["tax_document","company_document","other"]},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mimeType":{"type":"string","minLength":3,"maxLength":120},"contentBase64":{"type":"string","minLength":4,"maxLength":2900000}},"required":["filename","mimeType","contentBase64"],"additionalProperties":false}},"required":["kind","recordKind","file"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"email"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"useSavedConfig":{"default":true,"type":"boolean"},"draft":{"default":{},"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0,"maximum":1},"providerConfidence":{"type":"number","minimum":0,"maximum":1},"sameEventProbability":{"type":"number","minimum":0,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false}},"additionalProperties":false}},"required":["kind","messageId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"receipt"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"useSavedConfig":{"default":true,"type":"boolean"},"draft":{"default":{},"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":120},"matchThresholds":{"type":"object","properties":{"selectedProbability":{"type":"number","minimum":0,"maximum":1},"providerConfidence":{"type":"number","minimum":0,"maximum":1},"sameEventProbability":{"type":"number","minimum":0,"maximum":1},"runnerUpMargin":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"routingThresholds":{"type":"object","properties":{"probability":{"type":"number","minimum":0,"maximum":1},"confidence":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"autoApply":{"type":"boolean"}},"additionalProperties":false}},"required":["kind","entryId"],"additionalProperties":false}]}}}}},"get":{"summary":"Evaluate a supplied fixture against saved or draft automation settings without writing anything. kind routing classifies an email fixture; kind matching scores a receipt against bank candidates; kind document reads a real file exactly as the inbox does (file {filename, mimeType, contentBase64}, up to 2 MB: a receipt, invoice or statement as a PDF, image, office or text document, or an original .eml email, which is classified first): every page is turned into images with logos and signature graphics set aside, read twice with vision and settled by the stronger model when the readings disagree, and checked as the books would take it. It returns the classifier answer, the facts, the vision check, the entry or flags for each document, and the parts read. kind record reads a kept-record file (file as for document, recordKind tax_document, company_document or other) exactly as Tax › Records reads one, with the same pages, model, prompt and schema, and returns its fields, warnings, model, prompt version and parts; for a company record also describesCompany, wouldFill (filled, nothing_new, other_company or needs_admin) and the profile fields it fills or differs on. kind email runs the email-sorting classifier on an email already in the company inbox (messageId), rebuilt from what was stored when it arrived, and returns the new decision with what was decided at the time (example.stored). kind receipt runs the matcher on a receipt entry (entryId) against its current bank and card candidates (draft may also set autoApply). Both accept the same draft model and thresholds as routing and matching. Nothing is saved. Use it to test the pipeline without the dashboard, and to test custom models before saving them.","description":"Required scopes: accounting:read. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"ai_sandbox_evaluate_get","tags":["ai"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/ai.sandbox.evaluate"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/memory.list":{"post":{"summary":"List organization-wide remembered facts that guide future classification.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"memory_list","tags":["memory"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/memory.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List organization-wide remembered facts that guide future classification.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"memory_list_get","tags":["memory"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/memory.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/memory.save":{"post":{"summary":"Create or revise an organization-wide remembered fact with revision and idempotency checks. Applies to future classification only.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"memory_save","tags":["memory"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/memory.save"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":2000},"active":{"default":true,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["title","content"],"additionalProperties":false}}}}}},"/api/v1/accounting/senders.list":{"post":{"summary":"Read exact approved employee sending addresses.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"senders_list","tags":["senders"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/senders.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read exact approved employee sending addresses.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"senders_list_get","tags":["senders"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/senders.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/senders.upsert":{"post":{"summary":"Authorize an exact employee sending address with active membership.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"senders_upsert","tags":["senders"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/senders.upsert"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"userId":{"type":"string","minLength":1,"maxLength":200},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["email","userId"],"additionalProperties":false}}}}}},"/api/v1/accounting/senders.remove":{"post":{"summary":"Remove an approved sending address.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"senders_remove","tags":["senders"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/senders.remove"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/members.list":{"post":{"summary":"Read organization accounting membership and roles.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"members_list","tags":["members"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/members.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read organization accounting membership and roles.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"members_list_get","tags":["members"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/members.list"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/members.update":{"post":{"summary":"Manage organization accounting roles and active access.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"members_update","tags":["members"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/members.update"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","finance","contributor"]},"active":{"default":true,"type":"boolean"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["userId","email","role"],"additionalProperties":false}}}}}},"/api/v1/accounting/reports.summary":{"post":{"summary":"Return accounting totals separated by currency and provisional or reviewed record counts.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reports_summary","tags":["reports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reports.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false}}}}},"get":{"summary":"Return accounting totals separated by currency and provisional or reviewed record counts.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"reports_summary_get","tags":["reports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reports.summary"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/reports.export":{"post":{"summary":"Create a CSV or evidence ZIP export. Supply format, date filters and idempotencyKey. Tax exports require completed fiscal settings. Exports identify provisional records and unresolved items.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"reports_export","tags":["reports"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/reports.export"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"to":{"type":"string"},"format":{"type":"string","enum":["csv","bundle"]},"tax":{"default":false,"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["format"],"additionalProperties":false}}}}}},"/api/v1/accounting/wise.profiles":{"post":{"summary":"Discover eligible Wise profiles using backend read-only credentials.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_profiles","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.profiles"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Discover eligible Wise profiles using backend read-only credentials.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_profiles_get","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.profiles"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/wise.status":{"post":{"summary":"Read safe Wise synchronization readiness and last successful sync.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_status","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read safe Wise synchronization readiness and last successful sync.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"wise_status_get","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/wise.sync":{"post":{"summary":"Synchronize configured Wise statements with durable history and duplicate handling, and keep Wise's own monthly statement PDF for each balance once the month is over (each month once). Optional from and to fetch that inclusive history period (up to 400 days), including quiet balances, without changing the normal sync cursor. Each run fetches up to three monthly windows; remainingWindows and nextFrom say what remains. Pass nextFrom as from with the same to to continue. Future end dates stop at the database cutoff accepted for that request. Retrying the same key resumes its frozen original inputs; completed retries return the saved response. Use a new key for the next history pass or a new sync. Receipt jobs may be queued with imported zero and continue in their own worker. Matching and Autopilot jobs are queued once per accepted sync; Autopilot classifies the new lines afterwards unless skipAi is true.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"wise_sync","tags":["wise"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/wise.sync"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"skipAi":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.status":{"post":{"summary":"Read Stripe connection identity, sync progress and configuration readiness.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_status","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}}},"get":{"summary":"Read Stripe connection identity, sync progress and configuration readiness.","description":"Required scopes: accounting:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_status_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.status"},"x-required-scopes":["accounting:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"jobId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.sync":{"post":{"summary":"Queue durable read-only Stripe synchronization. Autopilot finishes the new activity afterwards unless skipAi is true.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_sync","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.sync"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"skipAi":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.payouts.list":{"post":{"summary":"List Stripe payouts, original amounts, statuses and reconciliation state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_payouts_list","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"from":{"type":"string"},"to":{"type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":50000},"status":{"type":"string","enum":["pending","in_transit","paid","failed","canceled"]}},"additionalProperties":false}}}}},"get":{"summary":"List Stripe payouts, original amounts, statuses and reconciliation state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_payouts_list_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":50000}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","in_transit","paid","failed","canceled"]}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.payouts.get":{"post":{"summary":"Read authoritative payout constituents, original snapshots, bank candidates and allocations.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_payouts_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read authoritative payout constituents, original snapshots, bank candidates and allocations.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_payouts_get_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.payouts.match":{"post":{"summary":"Match a paid Stripe payout to a bank deposit as a transfer, never revenue. Supply payoutId, transactionId, exact amountMinor, expectedRevision and idempotencyKey. Different currencies require bankAmountMinor plus exchangeRate in bank major units per payout major unit, exchangeRateDate and exchangeRateSource.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_payouts_match","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.match"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payoutId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountMinor":{"type":"string","pattern":"^\\d+$"},"bankAmountMinor":{"type":"string","pattern":"^\\d+$"},"exchangeRate":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,18})?$"},"exchangeRateDate":{"type":"string"},"exchangeRateSource":{"type":"string","minLength":3,"maxLength":1000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reuseEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedEntryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expectedTransactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["payoutId","transactionId","amountMinor","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.payouts.unmatch":{"post":{"summary":"Unmatch a Stripe payout allocation with allocationId and expectedRevision from the payout. Closed periods must be reopened by an administrator.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_payouts_unmatch","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.payouts.unmatch"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"allocationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["allocationId","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.review.list":{"post":{"summary":"List Stripe exceptions, unpaid invoices and payments not settled.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_review_list","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.review.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"from":{"type":"string"},"to":{"type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":50000}},"additionalProperties":false}}}}},"get":{"summary":"List Stripe exceptions, unpaid invoices and payments not settled.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_review_list_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.review.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":50000}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.review.resolve":{"post":{"summary":"Explicitly classify a Stripe suspense movement with id, treatment, provenance reason, expectedRevision and idempotencyKey. Original financial facts remain preserved.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_review_resolve","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.review.resolve"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"treatment":{"type":"string","enum":["income","income_refund","expense","refund","fee","transfer"]},"reason":{"type":"string","minLength":10,"maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","treatment","reason","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.review.acceptChange":{"post":{"summary":"Accept a verified changed Stripe source amount after finance review, with id, expectedRevision, reason and idempotencyKey. Open periods are required. Previous postings and snapshots remain preserved as reversed history; corrected facts create new provisional postings.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_review_acceptChange","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.review.acceptChange"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":10,"maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","reason","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.tax.confirm":{"post":{"summary":"Confirm the actual tax amount of a Stripe revenue entry with entryId, exact taxMinor, source reason, expectedRevision and idempotencyKey. Never assume unknown tax is zero.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"stripe_tax_confirm","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.tax.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taxMinor":{"type":"string","pattern":"^\\d+$"},"reason":{"type":"string","minLength":10,"maxLength":2000},"evidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","taxMinor","reason","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/stripe.report":{"post":{"summary":"Report original Stripe gross receipts, customer refunds, fees, reserves and payouts separately by currency. Gross receipts include any collected tax.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_report","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.report"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false}}}}},"get":{"summary":"Report original Stripe gross receipts, customer refunds, fees, reserves and payouts separately by currency. Gross receipts include any collected tax.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_report_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.report"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/stripe.snapshots.download":{"post":{"summary":"Get a short-lived authorized original financial Stripe JSON snapshot download by id. Client secrets are redacted before archival.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_snapshots_download","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.snapshots.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a short-lived authorized original financial Stripe JSON snapshot download by id. Client secrets are redacted before archival.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"stripe_snapshots_download_get","tags":["stripe"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/stripe.snapshots.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.list":{"post":{"summary":"List the latest receipt-to-transaction matching decisions with source candidates, separate match probability and confidence, and review reasons. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_list","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"outcome":{"type":"string","enum":["review","unmatched","matched"]},"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Return matching decisions for this receipt submission only."}},"additionalProperties":false}}}}},"get":{"summary":"List the latest receipt-to-transaction matching decisions with source candidates, separate match probability and confidence, and review reasons. Finance access required.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_list_get","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["review","unmatched","matched"]}},{"name":"submissionId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Return matching decisions for this receipt submission only."}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.status":{"post":{"summary":"Read durable matching progress. Queued or processing status does not mean reconciliation has completed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_status","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read durable matching progress. Queued or processing status does not mean reconciliation has completed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"matching_status_get","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.status"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/matching.request":{"post":{"summary":"Queue a new durable matching pass over stored receipts and bank transactions. Uses the matching evaluator through AI Gateway and returns a job generation. Never creates bank transactions from model output. Finance access and idempotency key required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_request","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.request"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/accounting/matching.confirm":{"post":{"summary":"Confirm a proposed exact-amount receipt match after finance review. Requires decision, receipt and transaction revisions, proposed target revision when attaching to an existing bank entry, reason and idempotency key. Canonical provider amounts and original evidence are preserved.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_confirm","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"targetEntryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bankAmountMinor":{"type":"string","pattern":"^\\d+$"},"exchangeRate":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,8})(?:\\.\\d{1,18})?$"},"exchangeRateDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"exchangeRateSource":{"type":"string","minLength":3,"maxLength":1000},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["decisionId","expectedRevision","entryId","entryRevision","transactionId","transactionRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/matching.reject":{"post":{"summary":"Say a candidate bank transaction is not the payment for a receipt, using decisionId, expectedRevision, entryId, entryRevision, transactionId, an optional reason and idempotencyKey. That transaction is not suggested for the receipt again and the receipt goes to a person; the vendor pairing counts against future suggestions only when the line names a different vendor; matching reruns. Send undo: true to lift a rejection. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_reject","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.reject"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"transactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","maxLength":1000},"undo":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["decisionId","expectedRevision","entryId","entryRevision","transactionId"],"additionalProperties":false}}}}}},"/api/v1/accounting/matching.rerunEntry":{"post":{"summary":"Check one receipt's match again with its current details, without queueing a pass over every receipt. Supply entryId and idempotencyKey. Saves a fresh matching decision for the receipt, never confirms a match, and returns the receipt's latest decision. Use it when a receipt was edited after matching looked at it. Finance access required.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"matching_rerunEntry","tags":["matching"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/matching.rerunEntry"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId"],"additionalProperties":false}}}}}},"/api/v1/accounting/receipt.tax.confirm":{"post":{"summary":"Confirm GST/HST on a receipt or bank purchase, including an explicitly verified zero, with current revision, original source reason and idempotency key. Generic taxes remain separate; original printed components are preserved.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"receipt_tax_confirm","tags":["receipt"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/receipt.tax.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taxMinor":{"type":"string","pattern":"^\\d+$"},"reason":{"type":"string","minLength":10,"maxLength":1000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","taxMinor","reason","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/handoff.export":{"post":{"summary":"Export a versioned professional handoff with stable record identifiers, unresolved items and provider control totals. Employee records require supporting originals access. Generates no ledger postings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"handoff_export","tags":["handoff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/handoff.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false}}}}},"get":{"summary":"Export a versioned professional handoff with stable record identifiers, unresolved items and provider control totals. Employee records require supporting originals access. Generates no ledger postings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"handoff_export_get","tags":["handoff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/handoff.export"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/handoff.get":{"post":{"summary":"Read professional handoff, separate authorizations, filing confirmations and calendar-year payroll completeness. Prepared records never establish filing or create ledger postings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"handoff_get","tags":["handoff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/handoff.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["from","to"],"additionalProperties":false}}}}},"get":{"summary":"Read professional handoff, separate authorizations, filing confirmations and calendar-year payroll completeness. Prepared records never establish filing or create ledger postings.","description":"Required scopes: accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"handoff_get_get","tags":["handoff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/handoff.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/handoff.update":{"post":{"summary":"Record one handoff item with its owner, source, state, original documents and current revision. Filing acceptance requires retained confirmation. Stores no full payroll identity numbers and creates no postings.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"handoff_update","tags":["handoff"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/handoff.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"key":{"type":"string","enum":["engagement","prior_returns","prior_balances","workpapers","cra_income","cra_gst","cra_payroll","payroll_provider","t2_filing","gst_filing","payroll","contractor_identity"]},"item":{"type":"object","properties":{"status":{"type":"string","enum":["not_started","requested","received","reviewed","prepared","submitted","accepted","not_applicable"]},"owner":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":500},"note":{"type":"string","maxLength":1000},"requestId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"documentIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"confirmation":{"type":"string","maxLength":200},"authorizationEndsOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"calendarYear":{"anyOf":[{"type":"integer","minimum":1990,"maximum":2100},{"type":"null"}]},"payrollChecks":{"maxItems":12,"type":"array","items":{"type":"string","enum":["employee_identity","full_calendar_year","gross_pay","taxable_benefits","cpp_cpp2","ei","income_tax","pension_adjustment","remittances","provider_reconciled","slips_delivered","filing_confirmation"]}},"payrollReviews":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"calendarYear":{"type":"integer","minimum":1990,"maximum":2100},"checks":{"maxItems":12,"type":"array","items":{"type":"string","enum":["employee_identity","full_calendar_year","gross_pay","taxable_benefits","cpp_cpp2","ei","income_tax","pension_adjustment","remittances","provider_reconciled","slips_delivered","filing_confirmation"]}},"documentIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"register":{"type":"object","properties":{"payrollAccount":{"anyOf":[{"type":"string","pattern":"^\\d{9}RP\\d{4}$"},{"type":"null"}]},"provider":{"type":"string","maxLength":200},"coversFullCalendarYear":{"type":"boolean"},"providerEmployeeCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000},{"type":"null"}]},"providerGrossPayMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"remittedMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"expectedRemittanceMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"employees":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"employeeReference":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"provinceOfEmployment":{"type":"string","pattern":"^[A-Z]{2}$"},"identityOriginalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"grossPayMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"taxableBenefitsMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"cppMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"cpp2Minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"eiMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"incomeTaxMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"pensionableEarningsMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"insurableEarningsMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"pensionAdjustmentMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"dentalCoverageCode":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]}},"required":["employeeReference","name","provinceOfEmployment","identityOriginalId","grossPayMinor","taxableBenefitsMinor","cppMinor","cpp2Minor","eiMinor","incomeTaxMinor","pensionableEarningsMinor","insurableEarningsMinor","pensionAdjustmentMinor","dentalCoverageCode"],"additionalProperties":false}}},"required":["payrollAccount","provider","coversFullCalendarYear","providerEmployeeCount","providerGrossPayMinor","remittedMinor","expectedRemittanceMinor","employees"],"additionalProperties":false}},"required":["calendarYear","checks","documentIds"],"additionalProperties":false}},"engagementSetup":{"type":"object","properties":{"firm":{"type":"string","maxLength":200},"contact":{"type":"string","maxLength":200},"approver":{"type":"string","maxLength":200},"workFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"workTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"responsibilities":{"maxItems":7,"type":"array","items":{"type":"string","enum":["bookkeeping","month_end","year_end","gst_hst","payroll","t2_return","information_slips"]}},"systemOfRecord":{"anyOf":[{"type":"string","enum":["oatmilk","quickbooks","xero","sage","spreadsheet","other"]},{"type":"null"}]},"systemNote":{"type":"string","maxLength":300},"deliverables":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["financial_statements","t2_return","gst_hst_return","t4_slips","t4a_slips","bookkeeping_close"]},"responsible":{"type":"string","enum":["company","accountant","predecessor","payroll_provider"]},"dueOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"state":{"type":"string","enum":["not_started","prepared","reviewed","approved","not_applicable"]},"approvedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["kind","responsible","dueOn","state","approvedOn"],"additionalProperties":false}}},"required":["firm","contact","approver","workFrom","workTo","responsibilities","systemOfRecord","systemNote","deliverables"],"additionalProperties":false},"records":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["t2_schedules_gifi","assessments_correspondence","gst_hst_filings","payroll_slip_files","financial_statements","trial_balance_ledger","opening_balances","adjusting_entries","asset_cca_continuity","shareholder_loan_continuity","receivables_payables","unresolved_questions"]},"state":{"type":"string","enum":["available","missing","requested","received","reviewed","not_applicable"]},"ownership":{"type":"string","enum":["client","predecessor_working_paper","unknown"]},"holder":{"type":"string","maxLength":200},"owner":{"type":"string","maxLength":200},"documentIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["kind","state","ownership","holder","owner","documentIds"],"additionalProperties":false}},"authorization":{"type":"object","properties":{"state":{"type":"string","enum":["not_requested","requested","approved","revoked"]},"representative":{"type":"string","maxLength":200},"completedBy":{"type":"string","maxLength":200},"requestedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"approvedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"revokedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["state","representative","completedBy","requestedOn","approvedOn","revokedOn"],"additionalProperties":false},"filings":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"periodFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"periodTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"filedBy":{"type":"string","maxLength":200},"filedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"confirmation":{"type":"string","maxLength":200},"amended":{"type":"boolean"},"amountPaidMinor":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000000000},{"type":"null"}]},"assessment":{"type":"string","enum":["not_received","assessed","reassessed"]},"assessedOn":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"documentIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["periodFrom","periodTo","filedBy","filedOn","confirmation","amended","amountPaidMinor","assessment","assessedOn","documentIds"],"additionalProperties":false}},"balanceWorkpapers":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["opening_balances","trial_balance","closing_adjustments"]},"asOf":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"approvedBy":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":300},"lines":{"minItems":1,"maxItems":120,"type":"array","items":{"type":"object","properties":{"account":{"type":"string","minLength":1,"maxLength":120},"gifi":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"debitMinor":{"type":"integer","minimum":0,"maximum":100000000000},"creditMinor":{"type":"integer","minimum":0,"maximum":100000000000},"memo":{"type":"string","maxLength":200}},"required":["account","gifi","debitMinor","creditMinor","memo"],"additionalProperties":false}},"documentIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["kind","asOf","approvedBy","source","lines","documentIds"],"additionalProperties":false}}},"required":["status","owner","source","note","documentIds","confirmation","authorizationEndsOn","calendarYear","payrollChecks"],"additionalProperties":false},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["from","to","key","item","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/summaries.get":{"post":{"summary":"Read the separately generated purchase summary and supporting source references. Never treats a summary as financial evidence.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"summaries_get","tags":["summaries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/summaries.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["entryId"],"additionalProperties":false}}}}},"get":{"summary":"Read the separately generated purchase summary and supporting source references. Never treats a summary as financial evidence.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"summaries_get_get","tags":["summaries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/summaries.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"entryId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/summaries.update":{"post":{"summary":"Edit, dismiss or retry a purchase summary independently of receipt processing and human notes, with its current revision and idempotency key.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"summaries_update","tags":["summaries"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/summaries.update"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decision":{"type":"string","enum":["edit","dismiss","retry"]},"summary":{"type":"string","minLength":1,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["entryId","expectedRevision","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.purchaseCandidates":{"post":{"summary":"Find existing bank purchases to attach an authorized financial email as supporting evidence. Candidates remain separate; selecting a match requires human review.","description":"Required scopes: mail:read, accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_purchaseCandidates","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.purchaseCandidates"},"x-required-scopes":["mail:read","accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"query":{"type":"string","maxLength":100}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Find existing bank purchases to attach an authorized financial email as supporting evidence. Candidates remain separate; selecting a match requires human review.","description":"Required scopes: mail:read, accounting:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_purchaseCandidates_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.purchaseCandidates"},"x-required-scopes":["mail:read","accounting:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.attachEvidence":{"post":{"summary":"Attach a cleared financial email to an existing bank purchase with current revisions and a reason. Keeps the original document kind and tax uncertainty; creates no expense and never reuses evidence for another purchase.","description":"Required scopes: mail:read, mail:write, accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_attachEvidence","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.attachEvidence"},"x-required-scopes":["mail:read","mail:write","accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"entryRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":10,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id","entryId","expectedRevision","entryRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.list":{"post":{"summary":"Search visible company mail with search: literal text in the subject, sender, body, attachment filenames and extracted document text. searchScope headers limits it to subject and sender. archived false (default) searches inbox mail, true archived mail, all both. Results include items and total; use limit and offset to continue, then mail.get for full details. Restricted messages require explicit security permission. Connected personal inbox receipt searches use evidence.inboxSearch.start/get instead.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_list","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.list"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mailbox":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,39}$"},"purpose":{"type":"string","enum":["unclassified","financial","billing_notice","account_access","general","spam","uncertain"]},"status":{"type":"string","enum":["received","processing","ready","failed","quarantined","promoted"]},"read":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"archived":{"description":"false searches the inbox, true searches archived mail, all searches both.","anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","const":"all"}]},"search":{"description":"Case-insensitive literal text, including the email body and read attachments by default.","type":"string","maxLength":200},"searchScope":{"default":"all","description":"all searches subject, sender, body, attachment filenames and extracted document text. headers searches only subject and sender.","type":"string","enum":["all","headers"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"Search visible company mail with search: literal text in the subject, sender, body, attachment filenames and extracted document text. searchScope headers limits it to subject and sender. archived false (default) searches inbox mail, true archived mail, all both. Results include items and total; use limit and offset to continue, then mail.get for full details. Restricted messages require explicit security permission. Connected personal inbox receipt searches use evidence.inboxSearch.start/get instead.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_list_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.list"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"mailbox","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,39}$"}},{"name":"purpose","in":"query","required":false,"schema":{"type":"string","enum":["unclassified","financial","billing_notice","account_access","general","spam","uncertain"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["received","processing","ready","failed","quarantined","promoted"]}},{"name":"read","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"archived","in":"query","required":false,"schema":{"description":"false searches the inbox, true searches archived mail, all searches both.","anyOf":[{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},{"type":"string","const":"all"}]}},{"name":"search","in":"query","required":false,"schema":{"description":"Case-insensitive literal text, including the email body and read attachments by default.","type":"string","maxLength":200}},{"name":"searchScope","in":"query","required":false,"schema":{"default":"all","description":"all searches subject, sender, body, attachment filenames and extracted document text. headers searches only subject and sender.","type":"string","enum":["all","headers"]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.get":{"post":{"summary":"Read visible company mail with immutable evidence metadata, unbooked financial drafts, the email's activity log, Oatmilk's latest review (with its one open question, if any) and how adding it to the books is going.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.get"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read visible company mail with immutable evidence metadata, unbooked financial drafts, the email's activity log, Oatmilk's latest review (with its one open question, if any) and how adding it to the books is going.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_get_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.get"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.activity.get":{"post":{"summary":"Read the details of one entry in a visible email's activity, with id (the email) and eventId (the entry's id from mail.get activity): what Oatmilk's review concluded and how sure it was, a person's answer, how an entry was recorded and why, or which draft fields changed. Never returns the email's text.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_activity_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.activity.get"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","eventId"],"additionalProperties":false}}}}},"get":{"summary":"Read the details of one entry in a visible email's activity, with id (the email) and eventId (the entry's id from mail.get activity): what Oatmilk's review concluded and how sure it was, a person's answer, how an entry was recorded and why, or which draft fields changed. Never returns the email's text.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_activity_get_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.activity.get"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"eventId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.update":{"post":{"summary":"Mark company mail read, archived or spam with revision and idempotency checks.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_update","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.update"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"read":{"type":"boolean"},"archived":{"type":"boolean"},"spam":{"type":"boolean"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.download":{"post":{"summary":"Prepare an explicit short-lived download of authorized company mail evidence.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_download","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.download"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"evidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","evidenceId"],"additionalProperties":false}}}}},"get":{"summary":"Prepare an explicit short-lived download of authorized company mail evidence.","description":"Required scopes: mail:read. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_download_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.download"},"x-required-scopes":["mail:read"],"x-allowed-roles":["admin","finance"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"evidenceId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.retry":{"post":{"summary":"Queue company mail rescreening while preserving original evidence and human draft corrections. mail.rerun does the same and can start from a later step.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_retry","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.retry"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.rerun":{"post":{"summary":"Process an email again from its saved original, with id, expectedRevision, idempotencyKey and from: everything (screen, classify, read the documents with vision, fraud check and second opinion; the default, also called reclassify), reading (keep the classifier's answer and read the documents again) or review (keep the reading and ask Oatmilk's second opinion again). Every later step runs again with the workspace's current memory, people, vendors and bank lines. An email already added to the books can't be processed again: use matching.rerunEntry for its entry. A person's corrected draft is kept. Returns jobId and generation; follow the steps with runs.get (subjectType mail, subjectId the email id), then read the result with mail.get.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_rerun","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.rerun"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"from":{"default":"everything","type":"string","enum":["everything","reading","review"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.rerunMany":{"post":{"summary":"Process up to 50 emails again in one request, with items [{id, expectedRevision}], from (everything, reading or review, as in mail.rerun) and idempotencyKey. Each email gets its own job; returns queued [{id, jobId, generation}] and failed [{id, code, message}] so one stale or already-added email doesn't stop the rest.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_rerunMany","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.rerunMany"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}},"from":{"default":"everything","type":"string","enum":["everything","reading","review"]},"reason":{"type":"string","minLength":1,"maxLength":500},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["items"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.drafts.create":{"post":{"summary":"Create an unbooked human financial draft from eligible cleared mail after an explicit review reason.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_drafts_create","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.drafts.create"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.drafts.update":{"post":{"summary":"Save reviewed company financial facts with current message and draft revisions.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_drafts_update","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.drafts.update"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"messageRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"facts":{"type":"object","properties":{"receipts":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"merchant":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"merchantAddress":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"travelAddress":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"date":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"total":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"subtotal":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"tax":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"tip":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"discount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"type":{"type":"string","enum":["expense","income","income_refund","refund","transfer","fee"]},"invoiceNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"description":{"type":"string","maxLength":1000},"taxes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":100},"amount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]}},"required":["label","amount"],"additionalProperties":false}},"sourceEvidenceIds":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"lineItems":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":500},"amount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"basis":{"type":"string","enum":["gross","net","unknown"]},"sourceEvidenceIds":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}}},"required":["description","amount","basis","sourceEvidenceIds"],"additionalProperties":false}},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"documentKind":{"type":"string","enum":["receipt","invoice","statement","refund_notice","credit_note","other","unknown"]},"paymentState":{"type":"string","enum":["paid","unpaid","partial","refunded","unknown"]},"categoryId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"documentClaims":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["receipt","invoice","credit_note","refund_notice","statement","other","unknown"]},"issuer":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","taxId","email"],"additionalProperties":false},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]}},"required":["name","taxId","email"],"additionalProperties":false},{"type":"null"}]},"issueDate":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"taxPointDate":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"paymentState":{"type":"string","enum":["paid","unpaid","partial","refunded","unknown"]},"amountPaid":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"amountDue":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"relatedInvoiceNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["kind","issuer","customer","issueDate","dueDate","taxPointDate","paymentState","amountPaid","amountDue","relatedInvoiceNumber"],"additionalProperties":false},{"type":"null"}]},"paymentCard":{"anyOf":[{"type":"object","properties":{"brand":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"lastFour":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]}},"required":["brand","lastFour"],"additionalProperties":false},{"type":"null"}]},"paymentBreakdown":{"anyOf":[{"type":"object","properties":{"cardAmount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"giftCardAmount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"creditAmount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]},"pointsValue":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]}},"required":["cardAmount","giftCardAmount","creditAmount","pointsValue"],"additionalProperties":false},{"type":"null"}]},"otherCharges":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":100},"amount":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^\\d+(?:\\.\\d+)?$"},{"type":"null"}]}},"required":["label","amount"],"additionalProperties":false}}},"required":["merchant","date","currency","total","subtotal","tax","tip","discount","type","invoiceNumber","description","taxes","sourceEvidenceIds","warnings","documentKind","paymentState"],"additionalProperties":false}},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"documentReadings":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"evidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","maxLength":255},"mimeType":{"type":"string","maxLength":200},"status":{"type":"string","enum":["read","unreadable","unsupported"]},"text":{"type":"string","maxLength":12000},"sourceEvidenceIds":{"maxItems":60,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}}},"required":["evidenceId","filename","mimeType","status","text","sourceEvidenceIds","warnings"],"additionalProperties":false}}},"required":["receipts","warnings"],"additionalProperties":false}},"required":["id","expectedRevision","messageRevision","facts"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.approve":{"post":{"summary":"Approve a cleared financial draft for accounting with explicit treatment and evidence provenance.","description":"Required scopes: mail:read, mail:write, accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_approve","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.approve"},"x-required-scopes":["mail:read","mail:write","accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"draftRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"treatment":{"type":"string","enum":["paid","provisional"]},"reason":{"type":"string","minLength":10,"maxLength":1000}},"required":["id","expectedRevision","draftRevision","treatment","reason"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.askAdmin":{"post":{"summary":"Ask the organization's other administrators by email to approve the new sender of a financial email, with id and idempotencyKey. Sends at most one request per member for each email and never approves the sender itself.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_askAdmin","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.askAdmin"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":true,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.review.answer":{"post":{"summary":"Answer the one question Oatmilk's review asked about an email, with id, reviewId, choiceId (a, b or c) and idempotencyKey. The choice's effect comes from the stored question: leave the draft, fix it, fix it and add it to the books through the same checks as mail.approve, or archive the email. Choices that change date, currency, total or tax only update the draft; a separate full draft review is required before booking.","description":"Required scopes: mail:read, mail:write, accounting:read, accounting:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_review_answer","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.review.answer"},"x-required-scopes":["mail:read","mail:write","accounting:read","accounting:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"choiceId":{"type":"string","enum":["a","b","c"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id","reviewId","choiceId"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.review.memory":{"post":{"summary":"Save or dismiss the memory entry Oatmilk suggested while reviewing an email, with id, reviewId, decision (save or dismiss) and idempotencyKey. Nothing is added to the organization's memory unless an administrator saves it.","description":"Required scopes: mail:read, mail:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_review_memory","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.review.memory"},"x-required-scopes":["mail:read","mail:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["save","dismiss"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id","reviewId","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.fraud.decide":{"post":{"summary":"Decide about an email's fraud warning with id, expectedRevision, decision (genuine or fraud) and idempotencyKey. genuine clears the warning so a person can add the email to the books; fraud archives it, turns automation off for it and keeps it out of the books. Both are written to the email's activity with who decided. Nothing is ever approved automatically.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_fraud_decide","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.fraud.decide"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"decision":{"type":"string","enum":["genuine","fraud"]}},"required":["id","expectedRevision","decision"],"additionalProperties":false}}}}}},"/api/v1/accounting/mail.fraud.rescan":{"post":{"summary":"Check recent company mail for fraud again with the current rules: days (1 to 30, default 14) and limit (1 to 100, default 50), within a short time budget. Returns checked, flagged, raised, skipped and more. It adds or keeps warnings (an earlier reviewer clearing stands only for the same weak history signals), keeps every person's decision, and turns automation off for flagged mail.","description":"Required scopes: mail:read, mail:write. Allowed roles: admin, finance. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_fraud_rescan","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.fraud.rescan"},"x-required-scopes":["mail:read","mail:write"],"x-allowed-roles":["admin","finance"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":14,"type":"integer","minimum":1,"maximum":30},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}}}},"/api/v1/accounting/mail.rules.list":{"post":{"summary":"Read exact sponsored vendor sender rules. Administrator access required.","description":"Required scopes: mail:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_rules_list","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.rules.list"},"x-required-scopes":["mail:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read exact sponsored vendor sender rules. Administrator access required.","description":"Required scopes: mail:read, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_rules_list_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.rules.list"},"x-required-scopes":["mail:read","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.inboundAddresses":{"post":{"summary":"List the organization's receiving email addresses. Contributors see only the accounting address.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_inboundAddresses","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.inboundAddresses"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the organization's receiving email addresses. Contributors see only the accounting address.","description":"Required scopes: accounting:read, mail:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"mail_inboundAddresses_get","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.inboundAddresses"},"x-required-scopes":["accounting:read","mail:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/mail.rules.save":{"post":{"summary":"Manage exact vendor sender authorization with an active finance sponsor and revision checks.","description":"Required scopes: mail:read, mail:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"mail_rules_save","tags":["mail"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/mail.rules.save"},"x-required-scopes":["mail:read","mail:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"sponsorUserId":{"type":"string","minLength":1,"maxLength":200},"active":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["email","sponsorUserId","active"],"additionalProperties":false}}}}}},"/api/v1/accounting/uploads.prepare":{"post":{"summary":"Prepare a private receipt or original email upload. Supply filename, mimeType, sizeBytes, sha256, idempotencyKey. If alreadyUploaded is true, the immutable original was verified: skip PUT and still confirm the returned submissionId. Otherwise upload unchanged bytes to uploadUrl, then confirm. Reuse the same idempotency key and payload on retry; changed payloads conflict. Authenticated identity is retained regardless of email headers. To add the receipt for one purchase, pass receiptFor with that entry id: it must still need a receipt or invoice (contributors: a purchase on their own card), the upload goes on its account, and matching compares the receipt with that purchase only.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"uploads_prepare","tags":["uploads"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/uploads.prepare"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","message/rfc822"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"claimedMetadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"paymentAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptFor":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptBatchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename","mimeType","sizeBytes","sha256"]}}}}}},"/api/v1/accounting/uploads.confirm":{"post":{"summary":"Confirm uploaded evidence using submissionId and idempotencyKey. Returns a durable processing job ID; completion must be checked separately.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"uploads_confirm","tags":["uploads"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/uploads.confirm"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["submissionId"]}}}}}},"/api/v1/accounting/inbox.list":{"post":{"summary":"List receipt submissions and their review or processing state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"inbox_list","tags":["inbox"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/inbox.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["prepared","queued","processing","review","completed","quarantined","failed"]},"source":{"type":"string","enum":["email","upload","mcp"]},"sort":{"type":"string","enum":["newest","oldest"]},"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}}}}}},"get":{"summary":"List receipt submissions and their review or processing state.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"inbox_list_get","tags":["inbox"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/inbox.list"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["prepared","queued","processing","review","completed","quarantined","failed"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["email","upload","mcp"]}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["newest","oldest"]}},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/submissions.get":{"post":{"summary":"Get a submission by submissionId, including its evidence, jobs, and resulting entry references even when extraction failed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"submissions_get","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["submissionId"]}}}}},"get":{"summary":"Get a submission by submissionId, including its evidence, jobs, and resulting entry references even when extraction failed.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"submissions_get_get","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"submissionId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/submissions.tripSuggestions":{"post":{"summary":"Suggest visible trips for one receipt using submissionId and sourceFactIndex. Compares the receipt date and printed location even when currency is unknown; returns confidence and a reason without linking anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"submissions_tripSuggestions","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.tripSuggestions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceFactIndex":{"type":"integer","minimum":0,"maximum":19}},"required":["submissionId","sourceFactIndex"],"additionalProperties":false}}}}},"get":{"summary":"Suggest visible trips for one receipt using submissionId and sourceFactIndex. Compares the receipt date and printed location even when currency is unknown; returns confidence and a reason without linking anything.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"submissions_tripSuggestions_get","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.tripSuggestions"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"submissionId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"sourceFactIndex","in":"query","required":true,"schema":{"type":"integer","minimum":0,"maximum":19}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/submissions.retry":{"post":{"summary":"Retry preserved receipt processing using submissionId, revision and idempotencyKey.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"submissions_retry","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.retry"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["submissionId","revision"]}}}}}},"/api/v1/accounting/submissions.release":{"post":{"summary":"Release quarantined accounting intake after administrator review. Restricted mail also requires security consent.","description":"Required scopes: accounting:read, accounting:write, accounting:admin. Allowed roles: admin. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"submissions_release","tags":["submissions"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/submissions.release"},"x-required-scopes":["accounting:read","accounting:write","accounting:admin"],"x-allowed-roles":["admin"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["submissionId","revision"]}}}}}},"/api/v1/accounting/evidence.download":{"post":{"summary":"Get an authorized short-lived private evidence download by evidenceId.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"evidence_download","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"evidenceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["evidenceId"]}}}}},"get":{"summary":"Get an authorized short-lived private evidence download by evidenceId.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"evidence_download_get","tags":["evidence"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/evidence.download"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"evidenceId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/emails.submitBatch":{"post":{"summary":"Submit original RFC822 emails using idempotencyKey and emails [{rawEmail,filename,metadata}]. Up to 20 emails and 3 MB total per request. Claimed sender metadata never authorizes a different user. Preserves original email bytes and returns processing jobs.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"emails_submitBatch","tags":["emails"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/emails.submitBatch"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"emails":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"rawEmail":{"type":"string","minLength":1,"maxLength":2000000},"filename":{"default":"original.eml","type":"string","maxLength":255},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["rawEmail"]}}},"required":["emails"],"description":"Submit up to 20 UTF-8 RFC822 originals, at most 3 MB for the entire serialized request. Use signed uploads for larger originals."}}}}}},"/api/v1/accounting/jobs.get":{"post":{"summary":"Get truthful asynchronous processing status by jobId.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"jobs_get","tags":["jobs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/jobs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["jobId"]}}}}},"get":{"summary":"Get truthful asynchronous processing status by jobId.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"jobs_get_get","tags":["jobs"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/jobs.get"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"jobId","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/api_keys.list":{"post":{"summary":"List metadata for your API keys. Secret values are never returned.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"api_keys_list","tags":["api_keys"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/api_keys.list"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"List metadata for your API keys. Secret values are never returned.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"api_keys_list_get","tags":["api_keys"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/api_keys.list"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"all","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/api_keys.create":{"post":{"summary":"Create a scoped expiring API key within your current role and credential ceiling. The secret is returned once.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"api_keys_create","tags":["api_keys"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/api_keys.create"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"scopes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["accounting:read","accounting:write","accounting:admin","mail:read","mail:write","mail:security","api_keys:manage","mailboxes:search"]}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["name","scopes"],"additionalProperties":false}}}}}},"/api/v1/accounting/api_keys.revoke":{"post":{"summary":"Revoke your API key; administrators may revoke organization keys.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"api_keys_revoke","tags":["api_keys"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/api_keys.revoke"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/api_keys.rotate":{"post":{"summary":"Replace your API key while preserving scope ceilings and revoking the original.","description":"Required scopes: api_keys:manage. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"api_keys_rotate","tags":["api_keys"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/api_keys.rotate"},"x-required-scopes":["api_keys:manage"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":true,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"scopes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["accounting:read","accounting:write","accounting:admin","mail:read","mail:write","mail:security","api_keys:manage","mailboxes:search"]}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/accounting/inbox.address":{"post":{"summary":"Read the address you forward receipts and invoices to. It's the organization's accounting address; anything sent to it from your verified email is filed as yours. Needs only accounting:read. Finance reads every receiving address with mail.inboundAddresses.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"inbox_address","tags":["inbox"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/inbox.address"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the address you forward receipts and invoices to. It's the organization's accounting address; anything sent to it from your verified email is filed as yours. Needs only accounting:read. Finance reads every receiving address with mail.inboundAddresses.","description":"Required scopes: accounting:read. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units.","operationId":"inbox_address_get","tags":["inbox"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/inbox.address"},"x-required-scopes":["accounting:read"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":true,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/accounting/uploads.inline":{"post":{"summary":"Add a receipt, invoice or original email in one call, for clients that can't upload to a link: filename, mimeType, contentBase64 (the file's bytes in base64, at most 2 MB), idempotencyKey, and optional receiptFor (the purchase it belongs to, as in uploads.prepare) and paymentAccountId. Oatmilk checks the bytes, stores them privately and starts processing; it returns submissionId and jobId. Retrying with the same key and file is safe. Larger files use uploads.prepare and uploads.confirm.","description":"Required scopes: accounting:read, accounting:write. Allowed roles: admin, finance, contributor. Active organization membership is checked for every operation. Money uses exact decimal strings in currency minor units. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"uploads_inline","tags":["uploads"],"security":[{"bearerAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/uploads.inline"},"x-required-scopes":["accounting:read","accounting:write"],"x-allowed-roles":["admin","finance","contributor"],"x-read-only":false,"x-destructive":false,"x-open-world":false,"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Optional organization selection; must match the credential's organization."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"For mutations requiring idempotency, supply this or input.idempotencyKey. If both are supplied they must match."}],"responses":{"200":{"description":"The action result. Asynchronous operations return a job identifier and current state; poll the corresponding status action for completion.","headers":{"X-Request-Id":{"description":"A unique ID for this request. Include it when you ask for help.","schema":{"type":"string"}},"X-Accounting-API-Version":{"description":"The date of the API contract this response follows.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"]}}}},"400":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request limit reached; retry after the Retry-After interval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The operation was rejected or could not complete. The response contains a safe error code and message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","message/rfc822"]},"contentBase64":{"type":"string","minLength":4,"maxLength":2796204},"claimedMetadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"paymentAccountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptFor":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"receiptBatchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["filename","mimeType","contentBase64"],"additionalProperties":false}}}}}},"/api/v1/contractor/identity.get":{"post":{"summary":"Read your own contractor record: your name, legal name, email and country.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_identity_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/identity.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own contractor record: your name, legal name, email and country.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_identity_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/identity.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/agreements.list":{"post":{"summary":"List the agreements sent to you for signature, with each one's status and version.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}}},"get":{"summary":"List the agreements sent to you for signature, with each one's status and version.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}]}},"/api/v1/contractor/agreements.get":{"post":{"summary":"Read one agreement sent to you, with its status, version and your signature events.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read one agreement sent to you, with its status, version and your signature events.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"/api/v1/contractor/agreements.download":{"post":{"summary":"Get a one-minute download link for an agreement sent to you, optionally one version.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_download","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.download"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Get a one-minute download link for an agreement sent to you, optionally one version.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreements_download_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreements.download"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}]}},"/api/v1/contractor/hours.list":{"post":{"summary":"List your own time entries, optionally from and to dates.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"List your own time entries, optionally from and to dates.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/v1/contractor/hours.create":{"post":{"summary":"Log time: a date (not in the future, and not in a pay period that was already paid), minutes and a description, as a draft to submit with your timesheet. A day can't add up to more than 24 hours. The same work on the same day twice is refused unless confirmDuplicate is true.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_create","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.create"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"minutes":{"type":"integer","minimum":1,"maximum":1440},"description":{"type":"string","minLength":1,"maxLength":2000},"confirmDuplicate":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["date","minutes","description"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.update":{"post":{"summary":"Change one of your draft or returned time entries (date, minutes, description) with its expectedRevision. The same rules as logging time apply.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_update","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.update"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"minutes":{"type":"integer","minimum":1,"maximum":1440},"description":{"type":"string","minLength":1,"maxLength":2000},"confirmDuplicate":{"type":"boolean"}},"required":["id","expectedRevision","date","minutes","description"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.amend":{"post":{"summary":"Change one of your submitted time entries (date, minutes, description, and optionally the custom field values) with its expectedRevision, as long as nobody has reviewed it yet. It stays submitted, and a reviewer who already opened it is told it changed.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_amend","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.amend"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"minutes":{"type":"integer","minimum":1,"maximum":1440},"description":{"type":"string","minLength":1,"maxLength":2000},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,39}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}},{"type":"null"}]}},"confirmDuplicate":{"type":"boolean"},"reason":{"type":"string","maxLength":1000}},"required":["id","expectedRevision","date","minutes","description"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.submit":{"post":{"summary":"Submit one of your time entries for approval with its expectedRevision, once the hours form's required fields are filled in.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_submit","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.submit"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.withdraw":{"post":{"summary":"Take a submitted time entry back to draft with its expectedRevision, before it's reviewed.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_withdraw","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.withdraw"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.correction.request":{"post":{"summary":"Report a mistake in one of your approved time entries (hoursId, its expectedRevision, the corrected date, minutes and description, and a reason). The approved entry stays as it is and is held out of payouts until finance decides. Hours that were already paid are raised with finance as an adjustment instead. One correction can be open per entry.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_correction_request","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.correction.request"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hoursId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"minutes":{"type":"integer","minimum":1,"maximum":1440},"description":{"type":"string","minLength":1,"maxLength":2000},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,39}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}},{"type":"null"}]}},"reason":{"type":"string","minLength":3,"maxLength":1000},"confirmDuplicate":{"type":"boolean"}},"required":["hoursId","expectedRevision","date","minutes","description","reason"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.correction.withdraw":{"post":{"summary":"Take back a correction you reported (correctionId) before finance decides on it, so the entry can be paid as approved.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_correction_withdraw","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.correction.withdraw"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"correctionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150}},"required":["correctionId"],"additionalProperties":false}}}}}},"/api/v1/contractor/signatures.status":{"post":{"summary":"Read where your signature on an agreement stands.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_signatures_status","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/signatures.status"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Read where your signature on an agreement stands.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_signatures_status_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/signatures.status"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"/api/v1/contractor/signatures.prepare":{"post":{"summary":"Start signing an agreement in your own portal session. Only you can, interactively; agents can't sign for you.","description":"This action requires the assigned contractor's interactive dashboard session with recent identity verification. External API and MCP calls are rejected with INTERACTIVE_SIGNATURE_REQUIRED and a portalUrl for the agreement; integrations cannot sign on a person's behalf.","operationId":"contractor_signatures_prepare","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/signatures.prepare"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":true,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/contractor/signatures.accept":{"post":{"summary":"Accept and sign an agreement in your own portal session, after reviewing the exact version. Only you can, interactively; agents can't sign for you.","description":"This action requires the assigned contractor's interactive dashboard session with recent identity verification. External API and MCP calls are rejected with INTERACTIVE_SIGNATURE_REQUIRED and a portalUrl for the agreement; integrations cannot sign on a person's behalf. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_signatures_accept","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/signatures.accept"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":true,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"challenge":{"type":"string","minLength":40,"maxLength":200},"documentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"consent":{"type":"boolean","const":true},"legalName":{"type":"string","minLength":1,"maxLength":300}},"required":["id","expectedRevision","challengeId","challenge","documentSha256","version","consent","legalName"],"additionalProperties":false}}}}}},"/api/v1/contractor/signatures.decline":{"post":{"summary":"Decline an agreement with a reason, in your own portal session. Only you can, interactively; agents can't decide for you.","description":"This action requires the assigned contractor's interactive dashboard session with recent identity verification. External API and MCP calls are rejected with INTERACTIVE_SIGNATURE_REQUIRED and a portalUrl for the agreement; integrations cannot sign on a person's behalf. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_signatures_decline","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/signatures.decline"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":true,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":150},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["id","expectedRevision","reason"],"additionalProperties":false}}}}}},"/api/v1/contractor/requests.list":{"post":{"summary":"Read the personal requests assigned to you for your own contractor profile and timesheets.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_requests_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/requests.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mine":{"default":true,"type":"boolean"},"status":{"default":"open","type":"string","enum":["open","done","cancelled","all"]},"subjectType":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]},"subjectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Read the personal requests assigned to you for your own contractor profile and timesheets.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_requests_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/requests.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"mine","in":"query","required":false,"schema":{"default":true,"type":"boolean"}},{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","done","cancelled","all"]}},{"name":"subjectType","in":"query","required":false,"schema":{"type":"string","enum":["entry","submission","mail","statement","contractor","timesheet","compliance_item","intake_item"]}},{"name":"subjectId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}]}},"/api/v1/contractor/requests.update":{"post":{"summary":"Complete a personal request assigned to you using its current revision and an idempotency key.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_requests_update","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/requests.update"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["done","cancelled"]},"response":{"type":"string","maxLength":2000},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["id","status","expectedRevision"],"additionalProperties":false}}}}}},"/api/v1/contractor/organizations.list":{"post":{"summary":"List the companies whose contractor portal records are linked to your verified account. Use it first: pass the organizationId you choose with every other contractor call, or send the X-Accounting-Organization header.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. It needs no company: call it first to choose the X-Accounting-Organization for the other calls.","operationId":"contractor_organizations_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/organizations.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"List the companies whose contractor portal records are linked to your verified account. Use it first: pass the organizationId you choose with every other contractor call, or send the X-Accounting-Organization header.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. It needs no company: call it first to choose the X-Accounting-Organization for the other calls.","operationId":"contractor_organizations_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/organizations.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/home.get":{"post":{"summary":"Read your own portal summary for one company: your agreement and rate, your next payday, and the one thing to do next (a payment that couldn't be sent, returned hours, an agreement to sign, hours due, or details still needed).","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_home_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/home.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own portal summary for one company: your agreement and rate, your next payday, and the one thing to do next (a payment that couldn't be sent, returned hours, an agreement to sign, hours due, or details still needed).","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_home_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/home.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/profile.get":{"post":{"summary":"Read your own onboarding profile, completeness, pay cadence, and masked payment details.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_profile_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/profile.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own onboarding profile, completeness, pay cadence, and masked payment details.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_profile_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/profile.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/profile.save":{"post":{"summary":"Update your own legal name, roles, contact details, address, sales tax, and corporation details.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_profile_save","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/profile.save"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"profile":{"type":"object","properties":{"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"roles":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"phone":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[0-9+().\\s-]*$"},{"type":"null"}]},"discordUsername":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"githubUsername":{"anyOf":[{"type":"string","maxLength":39,"pattern":"^([A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38})?$"},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"portfolioUrl":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(https?:\\/\\/\\S+)?$"},{"type":"null"}]},"customContacts":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","minLength":1,"maxLength":500}},"required":["label","value"],"additionalProperties":false}},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","pattern":"^([A-Za-z]{2})?$"}},"additionalProperties":false},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"tax":{"type":"object","properties":{"chargesSalesTax":{"default":false,"type":"boolean"},"salesTaxRateBps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"salesTaxNumber":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"province":{"anyOf":[{"type":"string","enum":["AB","BC","MB","NB","NL","NS","NT","NU","ON","PE","QC","SK","YT"]},{"type":"null"}]},"operatesAsCorporation":{"default":false,"type":"boolean"},"corporationName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"businessNumber":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"corporationAddress":{"anyOf":[{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"region":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":20},"country":{"type":"string","pattern":"^([A-Za-z]{2})?$"}},"additionalProperties":false},{"type":"null"}]},"signerName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"signerTitle":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"usTaxForm":{"anyOf":[{"type":"string","enum":["w9","w8ben","w8bene","unsure"]},{"type":"null"}]},"usTaxClassification":{"anyOf":[{"type":"string","enum":["individual","c_corporation","s_corporation","partnership","trust_estate","llc_c","llc_s","llc_p","other"]},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}},"required":["profile"],"additionalProperties":false}}}}}},"/api/v1/contractor/payment.get":{"post":{"summary":"Read your own payment method with account numbers masked.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payment_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payment.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own payment method with account numbers masked.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payment_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payment.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/payment.save":{"post":{"summary":"Replace your own payment details. Saved numbers are never shown again in full. Change bank details in your contractor portal. Agents and API tokens can't replace payment details.","description":"Only the contractor can do this, in their own contractor portal. External API and MCP calls are rejected with INTERACTIVE_PORTAL_REQUIRED and a portalUrl for the exact step; bank details and tax numbers never pass through an integration. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_payment_save","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payment.save"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":true,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"method":{"type":"string","enum":["wise_email","bank_transfer","interac","other"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"details":{"type":"object","properties":{"wiseEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"wiseLink":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^(https:\\/\\/\\S+)?$"},{"type":"null"}]},"accountHolderName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"bankAddress":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^([A-Za-z0-9][A-Za-z0-9 -]{2,38}[A-Za-z0-9])?$"},{"type":"null"}]},"swiftBic":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"iban":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"institutionNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{3})?$"},{"type":"null"}]},"transitNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{5})?$"},{"type":"null"}]},"routingNumber":{"anyOf":[{"type":"string","pattern":"^(\\d{9})?$"},{"type":"null"}]},"accountType":{"anyOf":[{"type":"string","enum":["checking","savings"]},{"type":"null"}]},"country":{"anyOf":[{"type":"string","pattern":"^([A-Za-z]{2})?$"},{"type":"null"}]},"interacEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"otherInstructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false},"replaceUnreadable":{"type":"boolean"}},"required":["method","currency","details"],"additionalProperties":false}}}}}},"/api/v1/contractor/hours.form":{"post":{"summary":"Read the custom fields you fill in for each time entry.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_form","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.form"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read the custom fields you fill in for each time entry.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_form_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.form"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/hours.details.list":{"post":{"summary":"Read the custom field values for your own time entries.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_details_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.details.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"Read the custom field values for your own time entries.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_hours_details_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.details.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/v1/contractor/hours.details.save":{"post":{"summary":"Save custom field values for one of your own draft or returned time entries. Fill a time entry's required custom fields here before submitting it (hours.form lists them).","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_hours_details_save","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/hours.details.save"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hoursId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,39}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}},{"type":"null"}]}}},"required":["hoursId","values"],"additionalProperties":false}}}}}},"/api/v1/contractor/timesheet.get":{"post":{"summary":"Read one of your pay periods, by id or by a date in it, with its entries, custom fields, due date, pay date, and any hour limits in your agreement with how many hours are left this week, this month and in total.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_timesheet_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/timesheet.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false}}}}},"get":{"summary":"Read one of your pay periods, by id or by a date in it, with its entries, custom fields, due date, pay date, and any hour limits in your agreement with how many hours are left this week, this month and in total.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_timesheet_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/timesheet.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"periodId","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/v1/contractor/timesheet.noHours":{"post":{"summary":"Mark your own empty pay period as having no hours, or undo your own report before finance skips it.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_timesheet_noHours","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/timesheet.noHours"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"noHours":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["periodId","expectedRevision","noHours"],"additionalProperties":false}}}}}},"/api/v1/contractor/timesheet.fill":{"post":{"summary":"Fill one of your own empty current or past pay periods with draft time entries copied from the last period or your usual pattern. Dates, hours, and reusable form answers can be reviewed before submission.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_timesheet_fill","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/timesheet.fill"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"type":"string","enum":["lastPeriod","usualPattern"]},"entries":{"minItems":1,"maxItems":31,"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"minutes":{"type":"integer","minimum":1,"maximum":1440},"description":{"type":"string","minLength":1,"maxLength":2000},"values":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]{0,39}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":100}},{"type":"null"}]}}},"required":["date","minutes","description","values"],"additionalProperties":false}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["periodId","expectedRevision","source"],"additionalProperties":false}}}}}},"/api/v1/contractor/history.list":{"post":{"summary":"Read your own past and current timesheet history, including imported weeks and their agreement-based rate estimates.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_history_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/history.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Read your own past and current timesheet history, including imported weeks and their agreement-based rate estimates.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_history_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/history.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}]}},"/api/v1/contractor/timesheet.submit":{"post":{"summary":"Submit all of your draft entries in a pay period (by id, or by a date in it when the dates aren't in a scheduled pay period) after required custom fields are filled in, in one step: either all of them go to review or none do. Skipped and paid periods can't take hours.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_timesheet_submit","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/timesheet.submit"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":[],"additionalProperties":false}}}}}},"/api/v1/contractor/payouts.list":{"post":{"summary":"Read your own payouts and when they were sent.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_list","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Read your own payouts and when they were sent.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_list_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.list"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}]}},"/api/v1/contractor/payments.history":{"post":{"summary":"Read your own linked bank payments, paid Oatmilk payouts and imported paid history for this employer, without bank descriptions or internal matching details.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payments_history","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payments.history"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":30,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}}},"get":{"summary":"Read your own linked bank payments, paid Oatmilk payouts and imported paid history for this employer, without bank descriptions or internal matching details.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payments_history_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payments.history"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"limit","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}}]}},"/api/v1/contractor/payouts.statement":{"post":{"summary":"Download a payment statement (PDF) for one of your paid payouts by id: what it was for, fees, GST/HST, total and date. It isn't a pay stub.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_statement","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.statement"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false}}}}},"get":{"summary":"Download a payment statement (PDF) for one of your paid payouts by id: what it was for, fees, GST/HST, total and date. It isn't a pay stub.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_statement_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.statement"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"id","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"/api/v1/contractor/payouts.summary":{"post":{"summary":"Download a summary (PDF) of your payments in a calendar year (calendarYear), with totals by currency before and after GST/HST, for your own tax return.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_summary","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.summary"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calendarYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["calendarYear"],"additionalProperties":false}}}}},"get":{"summary":"Download a summary (PDF) of your payments in a calendar year (calendarYear), with totals by currency before and after GST/HST, for your own tax return.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_payouts_summary_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/payouts.summary"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"calendarYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}}]}},"/api/v1/contractor/onboarding.save":{"post":{"summary":"Record which setup questions you answered or skipped, whether you finished, and whether you agree to get your tax slips and pay statements by email. It changes nothing else about your profile. Over the API and MCP only answered, skipped and completed are accepted: agreeing to get tax slips by email (eDelivery) is the person's own choice in the portal and is refused with INTERACTIVE_PORTAL_REQUIRED.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_onboarding_save","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/onboarding.save"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"answered":{"maxItems":40,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,30}$"}},"skipped":{"maxItems":40,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2,30}$"}},"eDelivery":{"type":"boolean"},"eDeliveryVersion":{"type":"string","pattern":"^[0-9A-Za-z._-]{1,20}$"},"completed":{"type":"boolean"}},"required":[],"additionalProperties":false}}}}}},"/api/v1/contractor/reminders.set":{"post":{"summary":"Turn off, or back on, the emails that remind you to log, send and finish things. To take a break, turn them off with until, the day they start again by themselves (after today, at most two years away); pay periods inside a break are never reminded about. Emails about payments, returned hours and agreements always keep coming.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_reminders_set","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/reminders.set"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"off":{"type":"boolean"},"until":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["off"],"additionalProperties":false}}}}}},"/api/v1/contractor/taxInfo.get":{"post":{"summary":"Read your own tax numbers, shown only partly, and what your tax slip still needs: your SIN or business number and a complete mailing address.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_taxInfo_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/taxInfo.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your own tax numbers, shown only partly, and what your tax slip still needs: your SIN or business number and a complete mailing address.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_taxInfo_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/taxInfo.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}},"/api/v1/contractor/taxInfo.save":{"post":{"summary":"Add, replace or remove one of your tax numbers (SIN, business number, ITN, or your country's tax number) for your tax slips. It's stored encrypted and only ever shown partly again. Add or replace a tax number in your contractor portal. Agents and API tokens can't handle full tax numbers.","description":"Only the contractor can do this, in their own contractor portal. External API and MCP calls are rejected with INTERACTIVE_PORTAL_REQUIRED and a portalUrl for the exact step; bank details and tax numbers never pass through an integration. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_taxInfo_save","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/taxInfo.save"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":true,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"taxNumber":{"type":"object","properties":{"kind":{"type":"string","enum":["sin","bn","itn","foreign"]},"value":{"type":"string","minLength":1,"maxLength":40},"country":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2}$"},{"type":"null"}]}},"required":["kind","value"],"additionalProperties":false},"removeTaxNumber":{"type":"string","enum":["sin","bn","itn","foreign"]}},"required":[],"additionalProperties":false}}}}}},"/api/v1/contractor/invoice.prepare":{"post":{"summary":"Get a private upload link for an invoice (a PDF, PNG or JPEG up to 20 MB, with its size and SHA-256) for one of your pay periods.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_invoice_prepare","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/invoice.prepare"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":20000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["periodId","filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/contractor/invoice.attach":{"post":{"summary":"Attach an uploaded invoice to one of your pay periods. Finance sees it with your timesheet and your documents.","description":"Required scopes: contractor:read, contractor:write. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access. An idempotency key is required in either the Idempotency-Key header or the idempotencyKey body field. If both are supplied they must match.","operationId":"contractor_invoice_attach","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/invoice.attach"},"x-required-scopes":["contractor:read","contractor:write"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":200},"description":"Supply this or input.idempotencyKey; if both are supplied they must match."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"periodId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":20000000},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200}},"required":["periodId","filename","mimeType","sizeBytes","sha256"],"additionalProperties":false}}}}}},"/api/v1/contractor/agreement.get":{"post":{"summary":"Read your agreement in effect: your role, when it starts and ends, the notice it asks for to end it and the day that notice is due, and when new terms start if they do.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreement_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreement.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}}},"get":{"summary":"Read your agreement in effect: your role, when it starts and ends, the notice it asks for to end it and the day that notice is due, and when new terms start if they do.","description":"Required scopes: contractor:read. Requires a Clerk OAuth token and current verified contractor identity binding. Access is limited to the authenticated contractor's own records; company membership and finance API keys do not grant access.","operationId":"contractor_agreement_get_get","tags":["contractor-portal"],"security":[{"contractorOAuth":[]}],"externalDocs":{"description":"Fields, examples and a place to try it","url":"https://app.getoatmilk.com/docs/api/contractor/agreement.get"},"x-required-scopes":["contractor:read"],"x-interactive-only":false,"responses":{"200":{"description":"The contractor operation result wrapped in data."},"401":{"description":"A valid contractor OAuth token is required."},"403":{"description":"Contractor scope, identity or interactive-signature requirement was not satisfied."},"409":{"description":"The current revision or idempotency key conflicts with saved state."}},"parameters":[{"name":"X-Accounting-Organization","in":"header","required":false,"schema":{"type":"string"},"description":"Select an organization with an active contractor identity binding."}]}}},"webhooks":{"invoice.created":{"post":{"summary":"An invoice was created as a draft.","operationId":"webhook_invoice_created","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.created"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"bf4e5ff3-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.created","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":null,"status":"draft","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":null,"dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.updated":{"post":{"summary":"Invoice details changed.","operationId":"webhook_invoice_updated","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.updated"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"242a3bc2-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.updated","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":null,"status":"draft","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":null,"dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.review_requested":{"post":{"summary":"An automatically prepared invoice is waiting for an administrator's review.","operationId":"webhook_invoice_review_requested","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.review_requested"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"05df9dfe-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.review_requested","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"awaiting_approval","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.approved":{"post":{"summary":"An administrator approved a prepared invoice for sending.","operationId":"webhook_invoice_approved","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.approved"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"517c257c-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.approved","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"approved","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.issued":{"post":{"summary":"An invoice received its number and became final.","operationId":"webhook_invoice_issued","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.issued"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"88423668-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.issued","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"approved","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.sent":{"post":{"summary":"An invoice was emailed to the customer or marked as sent.","operationId":"webhook_invoice_sent","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.sent"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"5b5b1cd5-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.sent","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"sent","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null,"method":"email","automatic":false}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.payment_recorded":{"post":{"summary":"A payment was recorded against an invoice.","operationId":"webhook_invoice_payment_recorded","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.payment_recorded"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"8947d320-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.payment_recorded","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"partially_paid","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"50000","balanceMinor":"63000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null,"paymentId":"3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b","paymentAmountMinor":"50000"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.payment_removed":{"post":{"summary":"A recorded payment was removed from an invoice.","operationId":"webhook_invoice_payment_removed","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.payment_removed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"4aaf716a-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.payment_removed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"sent","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null,"paymentId":"3e4f5a6b-7c8d-4e9f-8a0b-1c2d3e4f5a6b","paymentAmountMinor":"50000"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.partially_paid":{"post":{"summary":"An invoice is partly paid and a balance remains.","operationId":"webhook_invoice_partially_paid","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.partially_paid"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"89abb6ea-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.partially_paid","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"partially_paid","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"50000","balanceMinor":"63000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.paid":{"post":{"summary":"An invoice is paid in full.","operationId":"webhook_invoice_paid","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.paid"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"5b5965f9-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.paid","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"paid","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"113000","balanceMinor":"0","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.overdue":{"post":{"summary":"An invoice passed its due date with a balance remaining.","operationId":"webhook_invoice_overdue","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.overdue"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"6466ebf5-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.overdue","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"overdue","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.voided":{"post":{"summary":"An invoice was voided.","operationId":"webhook_invoice_voided","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.voided"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"a6472076-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.voided","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"void","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"0","balanceMinor":"113000","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"invoice.status_changed":{"post":{"summary":"An invoice moved to a different status. Sent with the more specific event for the new status.","operationId":"webhook_invoice_status_changed","tags":["Invoices"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"invoice.status_changed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"64e730e8-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"invoice.status_changed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"number":"INV-2026-012","status":"paid","partyId":"0b7a5d5e-3c34-4b8e-9e6a-5f8d0a1c2b3d","currency":"CAD","totalMinor":"113000","amountPaidMinor":"113000","balanceMinor":"0","issueDate":"2026-09-01","dueDate":"2026-10-01","scheduledSendDate":null}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"party.created":{"post":{"summary":"A customer or vendor account was added.","operationId":"webhook_party_created","tags":["Accounts"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"party.created"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"d68f1ad6-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"party.created","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"party","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"name":"Synthetic Ventures Inc.","kind":"customer","jurisdiction":"CA-ON","currency":"CAD","archived":false}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"party.updated":{"post":{"summary":"Account details changed.","operationId":"webhook_party_updated","tags":["Accounts"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"party.updated"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"3b6af6a5-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"party.updated","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"party","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"name":"Synthetic Ventures Inc.","kind":"customer","jurisdiction":"CA-ON","currency":"CAD","archived":false}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"party.archived":{"post":{"summary":"An account was archived.","operationId":"webhook_party_archived","tags":["Accounts"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"party.archived"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"cbbd66c4-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"party.archived","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"party","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"name":"Synthetic Ventures Inc.","kind":"customer","jurisdiction":"CA-ON","currency":"CAD","archived":true}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.sent":{"post":{"summary":"A document was sent for signature. The subject is the envelope; subjectType and subjectId name the record it belongs to.","operationId":"webhook_signing_envelope_sent","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.sent"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"075b4f43-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.sent","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"title":"Synthetic services agreement","subjectType":"contractor","subjectId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","signers":2}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.viewed":{"post":{"summary":"A signer opened the document.","operationId":"webhook_signing_envelope_viewed","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.viewed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"52af32ad-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.viewed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"recipientId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.signed":{"post":{"summary":"A signer finished signing.","operationId":"webhook_signing_envelope_signed","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.signed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"4bb0ab43-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.signed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"recipientId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a","completed":false}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.completed":{"post":{"summary":"Everyone signed and the completed PDF is ready.","operationId":"webhook_signing_envelope_completed","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.completed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"60666626-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.completed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"title":"Synthetic services agreement","subjectType":"contractor","subjectId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","finalSha256":"9f2b5c1d7e3a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.declined":{"post":{"summary":"A signer declined to sign.","operationId":"webhook_signing_envelope_declined","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.declined"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"e54db1c1-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.declined","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"recipientId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.changes_requested":{"post":{"summary":"A signer suggested changes before signing. Signing waits until the sender sends a revised version or keeps the document as it is.","operationId":"webhook_signing_envelope_changes_requested","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.changes_requested"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"4fac8213-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.changes_requested","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"recipientId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a","requestId":"6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d","changes":2,"comments":1}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.revised":{"post":{"summary":"The sender answered suggested changes with a revised version. The subject is the old envelope, which is cancelled as replaced; revisedEnvelopeId is the new one sent for signature.","operationId":"webhook_signing_envelope_revised","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.revised"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"6c84221b-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.revised","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"title":"Synthetic services agreement","subjectType":"contractor","subjectId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","revisedEnvelopeId":"7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e","revision":2,"accepted":2,"rejected":1}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.voided":{"post":{"summary":"The sender voided the document.","operationId":"webhook_signing_envelope_voided","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.voided"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"531da664-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.voided","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"title":"Synthetic services agreement","subjectType":"contractor","subjectId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"signing.envelope.expired":{"post":{"summary":"The signing window ended before everyone signed.","operationId":"webhook_signing_envelope_expired","tags":["Signatures"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"signing.envelope.expired"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"afb478fa-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"signing.envelope.expired","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"envelope","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"title":"Synthetic services agreement","subjectType":"contractor","subjectId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.created":{"post":{"summary":"A checklist item was added.","operationId":"webhook_compliance_item_created","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.created"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"e49d1e1e-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.created","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"upcoming","category":"sales_tax"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.assigned":{"post":{"summary":"A checklist item's owner changed.","operationId":"webhook_compliance_item_assigned","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.assigned"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"0de97794-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.assigned","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"upcoming","assigneeUserId":"user_synthetic"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.due_soon":{"post":{"summary":"A checklist item was included in a reminder before its due date.","operationId":"webhook_compliance_item_due_soon","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.due_soon"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"4b4cdc02-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.due_soon","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","daysUntil":14,"digestKey":"gst_hst_return:2026-10-31"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.overdue":{"post":{"summary":"A checklist item passed its due date.","operationId":"webhook_compliance_item_overdue","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.overdue"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"89b5aa20-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.overdue","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","daysUntil":-2,"digestKey":"gst_hst_return:2026-10-31"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.completed":{"post":{"summary":"A checklist item was marked done.","operationId":"webhook_compliance_item_completed","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.completed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"45d673e3-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.completed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"done"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.skipped":{"post":{"summary":"A checklist item was marked not applicable.","operationId":"webhook_compliance_item_skipped","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.skipped"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"a43d5876-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.skipped","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"skipped"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.snoozed":{"post":{"summary":"A checklist item was snoozed.","operationId":"webhook_compliance_item_snoozed","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.snoozed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"aba90388-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.snoozed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"upcoming","snoozedUntil":"2026-10-15"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.item.reopened":{"post":{"summary":"A completed checklist item was reopened.","operationId":"webhook_compliance_item_reopened","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.item.reopened"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"7fc23838-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.item.reopened","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"ruleKey":"gst_hst_return","title":"GST/HST return","dueDate":"2026-10-31","status":"upcoming"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.reminder.sent":{"post":{"summary":"A reminder email was queued for administrators.","operationId":"webhook_compliance_reminder_sent","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.reminder.sent"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"bc71c767-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.reminder.sent","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_digest","id":"gst_hst_return:2026-10-31"},"data":{"groupKey":"gst_hst_return:2026-10-31","itemIds":["c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"],"recipientCount":2,"trigger":"schedule","emailId":"4b5c6d7e-8f9a-4b0c-8d1e-2f3a4b5c6d7e"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.kickoff.started":{"post":{"summary":"Tax preparation started automatically.","operationId":"webhook_compliance_kickoff_started","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.kickoff.started"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"6031a16b-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.kickoff.started","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"kind":"corporate","from":"2025-10-01","to":"2026-09-30","runId":"3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f","trigger":"schedule"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"compliance.kickoff.completed":{"post":{"summary":"The tax preparation workspace is ready.","operationId":"webhook_compliance_kickoff_completed","tags":["Compliance"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"compliance.kickoff.completed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"e48f84f1-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"compliance.kickoff.completed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"compliance_item","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"kind":"corporate","from":"2025-10-01","to":"2026-09-30","runId":"3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f","followUps":3,"emailQueued":true}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.profile.submitted":{"post":{"summary":"A contractor submitted their profile.","operationId":"webhook_contractor_profile_submitted","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.profile.submitted"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"bf2c169d-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.profile.submitted","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payment_profile.updated":{"post":{"summary":"A contractor's payment method changed. Account details aren't included.","operationId":"webhook_contractor_payment_profile_updated","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payment_profile.updated"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"dbabbb50-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payment_profile.updated","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","method":"wise_email","currency":"CAD","source":"contractor"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.hours.submitted":{"post":{"summary":"A contractor submitted hours for approval.","operationId":"webhook_contractor_hours_submitted","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.hours.submitted"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"af7232fd-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.hours.submitted","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","periodStart":"2026-09-01","periodEnd":"2026-09-15","submittedMinutes":2250}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.hours.approved":{"post":{"summary":"Submitted hours were approved.","operationId":"webhook_contractor_hours_approved","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.hours.approved"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"abbba00d-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.hours.approved","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","approvedEntries":5,"status":"approved"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.prepared":{"post":{"summary":"A payout was prepared from approved hours and is waiting for approval.","operationId":"webhook_contractor_payout_prepared","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.prepared"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"1704c2d0-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.prepared","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","totalMinor":"450000","currency":"CAD","status":"pending_approval"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.approved":{"post":{"summary":"An administrator approved a payout.","operationId":"webhook_contractor_payout_approved","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.approved"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"bf097e5e-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.approved","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","totalMinor":"450000","currency":"CAD","status":"approved"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.sent":{"post":{"summary":"A payout was sent through the payment provider.","operationId":"webhook_contractor_payout_sent","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.sent"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"2dab54b7-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.sent","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","totalMinor":"450000","currency":"CAD","status":"sent","environment":"production"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.paid":{"post":{"summary":"A payout was marked as paid.","operationId":"webhook_contractor_payout_paid","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.paid"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"2da99ddb-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.paid","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","totalMinor":"450000","currency":"CAD","status":"paid_manually"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.failed":{"post":{"summary":"A payout could not be completed.","operationId":"webhook_contractor_payout_failed","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.failed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"273519c2-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.failed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","errorCode":"WISE_TRANSFER_RETURNED","totalMinor":"450000","currency":"CAD"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.payout.cancelled":{"post":{"summary":"A payout was cancelled.","operationId":"webhook_contractor_payout_cancelled","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.payout.cancelled"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"f3aa8578-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.payout.cancelled","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor_payout","id":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","payoutId":"2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","periodId":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","totalMinor":"450000","currency":"CAD","status":"cancelled"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.agreement.imported":{"post":{"summary":"A signed contractor agreement was uploaded.","operationId":"webhook_contractor_agreement_imported","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.agreement.imported"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"d83680d7-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.agreement.imported","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","envelopeId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a","executedOn":"2026-09-01"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"contractor.agreement.sent":{"post":{"summary":"A contractor agreement was prepared or sent for signature.","operationId":"webhook_contractor_agreement_sent","tags":["Contractors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"contractor.agreement.sent"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"c719384d-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"contractor.agreement.sent","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"contractor","id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"data":{"contractorId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","envelopeId":"5d4c3b2a-1f0e-4d9c-8b7a-6e5f4d3c2b1a","sent":true}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"receipt.processed":{"post":{"summary":"A receipt finished processing and is ready for review.","operationId":"webhook_receipt_processed","tags":["Receipts and mail"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"receipt.processed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"55e6b5c2-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"receipt.processed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"submission","id":"4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a"},"data":{"submissionId":"4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a","entries":[{"merchant":"Synthetic Office Supply","date":"2026-09-18","currency":"CAD","amountMinor":"4520","categoryId":"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b","splits":[]}],"flags":[]}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"mail.received":{"post":{"summary":"An email to one of your Oatmilk addresses passed screening and reached the company inbox. Sender, subject, and content aren't included.","operationId":"webhook_mail_received","tags":["Receipts and mail"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"mail.received"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"2fde0a18-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"mail.received","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"mail","id":"6f7a8b9c-0d1e-4f2a-8b3c-4d5e6f7a8b9c"},"data":{"messageId":"6f7a8b9c-0d1e-4f2a-8b3c-4d5e6f7a8b9c","purpose":"financial","mailbox":"invoices"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"proposal.created":{"post":{"summary":"A suggested change is waiting for review.","operationId":"webhook_proposal_created","tags":["Suggestions"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"proposal.created"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"9008d816-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"proposal.created","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"proposalId":"8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e","subjectType":"invoice","subjectId":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10","field":"status","proposedValue":{"status":"paid"},"source":"rule","confidence":"high"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"proposal.decided":{"post":{"summary":"A person approved or declined a suggested change.","operationId":"webhook_proposal_decided","tags":["Suggestions"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"proposal.decided"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"be8ff2a0-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"proposal.decided","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"invoice","id":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"},"data":{"proposalId":"8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e","subjectType":"invoice","subjectId":"7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10","field":"status","decision":"approve","status":"applied"}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"notion.sync.completed":{"post":{"summary":"A Notion sync finished.","operationId":"webhook_notion_sync_completed","tags":["Connectors"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"notion.sync.completed"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}},"example":{"id":"2c2c186d-0d1e-4f2a-8b3c-4d5e6f7a8b9c","type":"notion.sync.completed","created":1790000000,"organizationId":"org_synthetic","subject":{"type":"connector","id":"notion"},"data":{"runId":"9c0d1e2f-3a4b-4c5d-8e6f-7a8b9c0d1e2f","direction":"both","read":4,"compared":3,"pushed":3,"created":1,"unchanged":0,"proposals":1,"suggestedLinks":0,"errors":0,"queued":0}}}}},"responses":{"200":{"description":"Answer any 2xx status within 10 seconds to acknowledge the delivery."}}}},"webhook.test":{"post":{"summary":"A test event sent from Settings or webhooks.test. It reaches every endpoint whatever its subscriptions.","operationId":"webhook_webhook_test","tags":["Testing"],"parameters":[{"name":"Oatmilk-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${raw body}` keyed with the endpoint secret>."},{"name":"Oatmilk-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Oatmilk-Delivery-Attempt","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","type","created","organizationId","subject","data"],"properties":{"id":{"type":"string"},"type":{"const":"webhook.test"},"created":{"type":"integer","description":"Unix seconds."},"organizationId":{"type":"string"},"test":{"type":"boolean"},"subject":{"anyOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Answer any 2xx status to acknowledge the delivery."}}}}},"components":{"securitySchemes":{"contractorOAuth":{"type":"http","scheme":"bearer","bearerFormat":"Clerk OAuth token","description":"Contractor scopes: contractor:read, contractor:write. Accounting API keys are not accepted for the contractor portal."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Oatmilk API key or Clerk OAuth token","description":"Available scopes: accounting:read, accounting:write, accounting:admin, mail:read, mail:write, mail:security, api_keys:manage, mailboxes:search."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"A stable code to branch on."},"message":{"type":"string","description":"A safe message to show a person."},"field":{"type":"string","description":"The first input field with a problem."},"docUrl":{"type":"string","format":"uri","description":"What the code means and what to do."},"dashboardUrl":{"type":"string","format":"uri","description":"Where a person finishes a step only they can take."},"portalUrl":{"type":"string","format":"uri","description":"Where a contractor finishes a step in their own portal."}}}}}}}}